Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Batchconvert pictures in filesize?

Jun 11, 2010 2:46AM PDT

Hi, I've searched all cnet and spent ous on the web looking for a program that kan batch convert pictures to the same FILE size, for example 80k. I found a huge selection that batch convert all kinds of way, picture size etc...

I also tried Photoshops "Save for web and..." ut that reall didn't work so good in "batch modes"

Please, if anyone knows of such a program, please let me know!

I think it's strange that I vouldnt find one as that would be a useful "batch" for al lot o f peopleHappy

Best Regards

Tobias Karlsson in Sweden

Discussion is locked

- Collapse -
We looked for that.
Jun 11, 2010 3:03AM PDT

In fact there is no such thing. Here's why. JPEG COMPRESSION is variable. A picture of say a white or single color sheet will compress handily down to a low number of bytes. An image with a flock of seagulls flying pass a rainbow billboard will not compress as well.

Hope the short version is enough for you but there are great tutorials and programmer's reference about image compression. Once you learn all that, you will then see why you can't ask for this.
Bob

- Collapse -
OK, I know what you mean:-)
Jun 11, 2010 3:37AM PDT

Thanks for you FAST answer!

>Here's why. JPEG COMPRESSION is variable

Yes, I undrestand thatHappy
But I thought there was som kind of program that could calculate and convert by file size output.

Adobe Photshop is close with it's "save for web something...", there you can clickon the upper left and choose "optimize for file size", but it doesn't work so good when creating an "action" command and the using a batch...

Best Regards

Tobias Karlsson in Sweden

- Collapse -
Ok, you could ask for that.
Jun 12, 2010 11:18PM PDT

And the calculations required would mean this app would calculating for days as it tried each possible LOSSY COMPRESSION SETTING.

To really understand this you would have to start reading a lot more about JPEG compression. I know that at first you would ask this question and think "why not" but after you got enough learning you would then think "I see why not."
Bob

- Collapse -
Hmmm, I don't agree
Jun 13, 2010 5:57AM PDT

I don't want to debate if you are right or wrong;

Please take a look in Adoe Photoshop and you will see that these kind of calculations already exists, doesn't take long time do do, and is rather accurate!

Two different ways in Adobe;

One example is when you choose "Save As" and when you select the jpg option you can push a "slider" to get the desired file size, this does not take long, millisecond in my computer, and mine is not the fastest oneHappy

Or you can, as I mentioned, using the "Save for Web & Devices" and then click in the right upper corner. You can then "Optimize for file size", choose how big you want the file size, click ok and save and it's done, the calculation takes no time either but it's boring doing this to a large amount of pictures.

So I know the function already exists, BUT, I'm looking for a program that can do it automatically in a batch, maybe some one written a "macro" to Adobe, anyone?

PLEASE be sure of that I'm NOT trying to be a wise guy or try to just be rude, but I cant understand why you're saying that this calculating would be so hard for the computer making it almost impossible in the real world when as I see it already exists and can be done, I just want a way to make it in a batchHappy
Oh, and ofcourse, when using these above two ways in Adobe to decide the output file size, it of course has to be reasonable changes, you cant go from 44M to 44kb, you CAN change the file size VERY much!

Thank you so much for taking you time!

Best Regards

Tobias Karlsson in Sweden

- Collapse -
Then you have a solution?
Jun 13, 2010 6:40AM PDT

I'm just an author of some apps, electronics designer, embedded apps and more. One of the systems I worked on was a taxi camera where we had this need to get the pictures to exactly some bytes. This is my background and why I wanted to discuss this.

If we didn't use JPEG compression it may be more predictable.

Sorry that I offended you in any way and hope you see fit to ask Adobe to supply a script for you.
Bob

- Collapse -
No no no no, you have not offened me:-)
Jun 13, 2010 7:14AM PDT

PLEASE understand that you have not offended me in any way and I appreciate that you're taking the time!!!
Maybe its one of those language barriersHappy

I'm just curious, have you checked out these options I mentioned in my previous?

I'm using these daily when I want for an example a 80k jpg pic from 2M, they may vary a kilo or two, but it's close enough for me, I just want to "automate" it!

Interesting that you already been thinking of this in your job! I can see the use for it in "watchout cameras" in taxicars.

Check out what I mentioned earlier, it works well with jpg's and Adobe PS do it fast!

Thank you so much, it's just a healthy discussionHappy

Best Regards

Tobias Karlsson in Sweden

- Collapse -
I use
Jun 13, 2010 12:05PM PDT

IRFANVIEW to do batch conversions but your "specification" is one I'm personally familiar with since it came up in the product design. The really sad part about it was the lost time over that spec. If they had left it a little loose say from 10 to 12 Kilobytes rather than 10,000 exact bytes we would have saved months going over why JPEG doesn't do that. We could have cheated and over compressed and then filled some bytes with extraneous data but why do that?

And yes I checked such options in the past. But let's say it's true. Why not talk to those that got this done?

In the meantime I'm unsure if you looked at IRFANVIEW.
Bob

- Collapse -
Hey
Jun 14, 2010 12:06AM PDT

PREFECT!!!

I downloaded Irfanview (used to have it!) and i do EXACTLY what I want batch converting with a file size rule, and you can also set the "longest side" to be a specific number, I used 800p.

It worked out VERY good, nice looking pics (the quality is what you could expect from a heavy compressed pic)

I use to have Irfanview, it's realy nice!

>But let's say it's true. Why not talk to those that got this done?

Not necessary now when I got IrfanviewWink

Maybe it was me not making it clear that it didn't have to make the pics EXACTLY (for example) 80k on the byte! 1 or 2 kg diff was ok. My apologizes!

Irfanview differed no more than 1k in my test I did, and always under the decided target size, very goodHappy

So, in the end, you helped me!

Thanks and take care

Tobias Karlsson

- Collapse -
Me and specifications.
Jun 14, 2010 12:40AM PDT

I apologize for that. It's something I am programmed to do. If the "contract" calls for "it shall do this" then I have to make it do that.

In the end I see you wanted only something "close to" so many K which that has solutions but for very deep reasons the software to compress to an exact number of bytes isn't there due to how many passes we'd have to take to see what comes out.

Glad we got there,
Bob

- Collapse -
Solved
Jun 27, 2010 12:41AM PDT

I know you have already solved this one with the absolutely fine application Ifanview (it truly is amazing and I use it myself, often!), but I wanted to put in a plug for one of my other favorite applications and that is the Faststone Photo Resizer. It will fulfill your needs and it also does a great deal more. You can find it at www.faststone.org. They have some other cools stuff, too. Oh, and it too is free of charge for non commercial use. I know this may be a little late, but I hope this information is helpful to you.

- Collapse -
Solved - New!
Jun 27, 2010 10:08AM PDT

Thanks for you interest in thisHappy

But I failed to see how Faststone would make a solution to this, I've downloaded it (it's a really good program) but I didn't find that option to save pics to a specific file size.
Thanks anyway to contributeHappy

Tobias Karlsson in Sweden

- Collapse -
Solved
Jun 28, 2010 12:03AM PDT

Hi there! I may not be understanding your requirements correctly, but if you look under advanced options and select the Resize tab, then check the Resize box (if you don't check it, you won't see the options), you will see options to resize by 'pixels', 'percentages' or 'resize based on one side'. Under the 'Pixels' option, you can specify exactly what size you want your output file(s) to be. However, that may not be what you need. I hope this helps!
Nelson

- Collapse -
Hi:-)
Jun 28, 2010 12:51AM PDT

>Under the 'Pixels' option, you can specify exactly what size you want your output file(s) to be.

Yes, I saw that, but what I was looking for is an option in a batch saves by choosing a specific file size (kb or M), not pic sizeHappy

But it's a nice program!

Thanks anyway

Tobias Karlsson