I just gave the program a little test drive under the name pixiv_preview_bot.
The script is here.
http://python.pastebin.com/m1551060
(I had to change all my passwords because of that post :( The next version is going to have the credentials in a separate file!)
I think it is necessary for the program to download the file. The program grabs the image URL from danbooru and tells danbooru to post a new image with out the _m. The program lets danbooru sort out any errors. However, if the file already exists, I don't know where on danbooru it is. Because danbooru saves everything as an md5, I need the md5 of the image to do anything.
You can take over the pixiv_preview_bot account to you if you want. It has a new password now though.