4MB for Any Forums

Ok Any Forums, last night I had an idea to write a batch file that would convert large images to 4MB jpegs from a right-click context menu to fit within Any Forums's file size limit. I've gotten it working, but I'd like someone to go over it since I REALLY don't know what I'm doing when it comes to batch files.

The batch file requires Irfanview (either 32 or 64 bit) to be in their default install locations, and it runs from a hardcoded C:\users\all users\ directory since I don't know how to get relative paths to work for context menus from the registry.
If anyone has a better idea, I'm all ears.

It creates irfanview INI files and calls them because that's the only way I could figure out to set it to convert the file size automatically. (I don't think I needed all the lines I put in, but I was tired and wasn't looking to give myself more things to debug)


Batch file:
pastebin.com/7CuP5d0d

Reg file for creating the context menus:
pastebin.com/kCTcJN3k

I didn't even know how to set a variable when I started, so I'm sure there's more than one thing stupid in there.
I'm not sure if the "if not exist" even works on a file. I didn't test that.

It does work.

Attached: IDK WTF.png (1499x1574, 162.3K)

Other urls found in this thread:

stackoverflow.com/questions/6917219/imagemagick-scale-jpeg-image-with-a-maximum-file-size
catbox.moe/
files.catbox.moe/sxjv2d.bat
files.catbox.moe/j4zbyn.reg
twitter.com/SFWRedditImages

damn couldnt you have used imagemagick for this user?

Install gentoo

phonefags have this built into their app

Does imagemagick support automatic file size output?

Irfanview has that built-in so it saved me from trying to figure another thing from the fucking command line.

Couldnt you just have included the inis as 2 other files and the used one command to copy them to that folder

i bet it would be extremely simple
like one freaking command.

stackoverflow.com/questions/6917219/imagemagick-scale-jpeg-image-with-a-maximum-file-size

Easier to just create them from one.

catbox.moe/

You want the files?

files.catbox.moe/sxjv2d.bat
files.catbox.moe/j4zbyn.reg

a better idea would be to convert ALL images to 4MB to waste 4cdn storage

Will this increase filesize? I would like to maximize the bandwidth my shitposting consumes, to punish phoneposters and archivists.

Attached: 1655744729303.png (2800x2995, 2.79M)

It will if you have highly compressed images.

1K --> 5K

Attached: 4MB download.jpg (310x163, 4.96K)

>write a batch file that would convert large images to 4MB
>to fit within Any Forums's file size limit
???

10MiB f
2MiB b bant r9k s4s
4MiB 3 a aco adv an biz c cgl ck cm co d diy e fa fit g gif h his i ic int jp k lgbt lit m mlp mu n news o pol pw qa sci sp t toy trash tv u v vg vip vm vmg vp vr vrpg vst vt x xs y
5MiB out p soc
6MiB w wg wsg
8MiB gd hc hm hr po qst r s tg trv wsr

obviously he doesnt use the other boards

It's only a few lines to change it to a different size.

I wanted to make sure one was working before I started releasing an 8 and 6MB one.

typical OP stoned or some shit not realizing there's simple solutions out there. Spends hours writing a worthless workaround.

I'm content using Irfanview.
Nobody has imagemagick installed, while Irfanview is quite popular.

Imagemagick also has a bazillion binaries and there's no telling if they're all saved to the same place.
Irfanview has two default locations -- one for 32 bit and one for 64, and this will work for anyone who next next nexted their way through either.

giving you a bump for your creativity

Attached: yotsuba+.png (1253x861, 1.75M)

>removed the "do not repost" text
i know you, criminal

artists that ruins their own art with stupid watermarks deserves to be forgotten