Welcome Guest.   Make a donation to an author on the site August 02, 2014, 01:35:50 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Check out and download the GOE 2007 Freeware Challenge productivity tools.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Batch image resizing, dimensions fixed, quality dependant on eventual file size?  (Read 8546 times)
suleika
Supporting Member
**
Posts: 117


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« on: May 02, 2008, 02:35:20 PM »

I have not one but two digicams now and I'm really getting into it as a hobby, and I'm doing quite well at organising the photos I work on, but the ones I don't work on are a bit of a mess and are taking up a lot of space.  Some of them I want to keep intact for working on in the future, and the rest I want to save as smaller jpg files (for reference, memento etc) and delete the originals.  A few of them I'm going to process by hand, but most of them could be batch processed.

Most of the originals are jpgs of (approx) either 3000x2000 and 1.5-3.5 MB, or 4200x3400 and 1.5 -5 MB.  (I'm not doing anything with my RAW files yet.)  I've tested quite a few and I've worked out that I'd like to make the files 1 MB but have them no smaller than 1000 pixels on the shorter side.  This won't be a one-off job; I'll be doing this every time I shoot.

I'm trying very hard to satisfice here rather than optimise - these photos are rejects, after all (I mainly want to be able to see why I rejected them, refer to the EXIF data, and also to keep a chronology alongside the photos I am keeping).  But the files vary in size quite a lot - and so if I use FastStone Image Viewer, for example, and set the shorter side at 1000 pixels, and set the jpg quality to give me an average file size of 1MB, I end up with quite a lot of files considerably smaller and larger than 1MB (and the setting would be different from batch to batch anyway).

Is there a smart way of doing this?  Does anyone know of a program that will deliver a file 1000 pixels short-side at 100% quality, unless result is more than 1MB, in which case try 99%, unless result is more than 1MB, in which case try 98%, etc etc?

Alternatively, is there a program that will simply reduce the quality of the jpg to a given file size (1MB) without resizing?  And can anyone tell me how different the result will be from a re-sized file (new dimensions) in terms of quality?  I would have thought it would be much the same when viewed at the same size on the screen.

I'm aware, by the way, that if I were to use a percentage as the quality setting then the resultant files would have a neatly consistent relationship to their originals, but I don't want to go that route, even though it would be easier to manage.  Firstly, the originals with smaller file sizes are the ones to benefit from not being over-compressed and the byte-rich files can afford it.  Secondly, if I can get the files near to 1MB each it will make accounting for future file storage extremely easy.

Logged
Alex Yakovlev
Honorary Member
**
Posts: 5


see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: May 02, 2008, 04:31:00 PM »

Batch file processing is a feature of Corel Paint Shop Pro Photo. All you should do is to setup actions performed on individual image file, select source and destination files/folders and click Start. However, it is commercial.
Logged
suleika
Supporting Member
**
Posts: 117


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: May 02, 2008, 04:38:42 PM »

I appreciate the swift reply.  Are you familiar with its particular batch processing possibilities?  Will it do either of those things I describe? 
Logged
CWuestefeld
Supporting Member
**
Posts: 931



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #3 on: May 02, 2008, 04:47:26 PM »

The app "Multiple Image Resizer" (http://www.multipleimageresizer.net/) will easily do the scaling including the smart "short side=1000" that you describe. But neither this nor anything else I've seen does the image-size targeting you ask for.

Frankly, this seems to be orders of magnitude more trouble than it can be worth. With the cost of storage these days, who cares if the output is 1.2MB rather than 1MB? And I don't discard any photos. In fact, I keep an archival copy straight from the camera, plus any edits separately, and I can easily backup my whole library onto 2-3 DVD, in under an hour.
Logged



suleika
Supporting Member
**
Posts: 117


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: May 02, 2008, 05:51:51 PM »

If no program will do it, then so be it.  If I can find one, I shall use it, and it will not be more trouble than it is worth to me.
Logged
housetier
Charter Honorary Member
***
Posts: 1,321


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #5 on: May 03, 2008, 03:46:06 AM »

IIRC, IrfanView can also do batch processing, as can the gimp and Imagemagick's convert. The latter two are FOSS.
Logged
4wd
Supporting Member
**
Posts: 3,273



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: May 03, 2008, 07:23:01 AM »

PictureScaler seems to have all the features you asked for.

Among them:

* Specify the new width or height of the images (even according to longest/shortest edge which is handy when you are scaling portrait and landscape images at the same time)
* Set the target file size when saving JPEGs

This seems to be their new WWW site.  Q-Technologies

Google is your friend  cheesy
« Last Edit: May 03, 2008, 07:35:14 AM by 4wd » Logged

Four wheel drive: Helping you get stuck faster, harder, further from help...........and it's no different on this forum Evil
suleika
Supporting Member
**
Posts: 117


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #7 on: May 03, 2008, 09:23:50 AM »

PictureScaler seems to have all the features you asked for.

It's looking good - I shall give it a trial.  Thank you. 

(Now wondering what my search terms were when I didn't previously find it myself... embarassed)
Logged
4wd
Supporting Member
**
Posts: 3,273



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #8 on: May 03, 2008, 07:14:41 PM »

Quote
It's looking good - I shall give it a trial.  Thank you. 

Had a play with it, the resizing works however rotating is disabled in the trial and specifying a size for the final JPEG is ghosted - so I can only assume it's disabled in the trial version.

BTW, only just noticed the author only lives 20k or so from me.

EDIT: It requires Quicktime to be installed to do it's 'final size' thing, (I used QT Alt 1.77 that I had), and it seems to work quite well, all pics had a short side of 1000 and came in about 10k under the 200kB I specified as final size.

It imprints a www site link along the bottom of the longest side, (trial version) - reasonably unobtrusive depending on final pic size.
« Last Edit: May 04, 2008, 01:43:29 AM by 4wd » Logged

Four wheel drive: Helping you get stuck faster, harder, further from help...........and it's no different on this forum Evil
suleika
Supporting Member
**
Posts: 117


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: May 04, 2008, 08:50:15 AM »

Had a play with it, the resizing works however rotating is disabled in the trial and specifying a size for the final JPEG is ghosted - so I can only assume it's disabled in the trial version.

EDIT: It requires Quicktime to be installed to do it's 'final size' thing, (I used QT Alt 1.77 that I had), and it seems to work quite well, all pics had a short side of 1000 and came in about 10k under the 200kB I specified as final size.

Funny - my "target file size" isn't greyed out, but when I set it at 1000KB the results ranged from 440KB to 970KB  - maximum size perhaps?  I do have Quicktime as it happens (btw, I couldn't find the info about Quicktime and there seems to be no helpfile). 

I had another better google session and found some other resources - I've just tried JpegResizer - created a batch between 820KB and 1040 - that's pretty good.  I shall probably go for it. 
Logged
4wd
Supporting Member
**
Posts: 3,273



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #10 on: May 04, 2008, 07:03:45 PM »

Funny - my "target file size" isn't greyed out, but when I set it at 1000KB the results ranged from 440KB to 970KB  - maximum size perhaps?  I do have Quicktime as it happens (btw, I couldn't find the info about Quicktime and there seems to be no helpfile).

I also tried setting it at 1MB and had sizes ranging from 400-800kB.  So I ran one pic through at size constraint of 1024kB which resulted in a file ~630kB and then I ran the same pic through saving at 100% quality which resulted in a 1.40MB file, (both times set at a resize of 'short side=1000').

I then compared the two using BeyondCompare's picture comparison and found there was actually minimal differences between them.

I tried the above on different photo subjects and every time it resulted in only minimal differences between the two output files.

You don't get told about Quicktime unless you don't have it installed, (which I normally don't), then it opens an info window.  Doesn't say it needs it for the 'final size' output option though.

The help file is a PDF download from the author's WWW site PictureScaler User Guide.

Quote
I had another better google session and found some other resources - I've just tried JpegResizer - created a batch between 820KB and 1040 - that's pretty good.  I shall probably go for it. 

Link five in the Google search in my original post  Wink

I'm sure there's probably a freeware alternative to these programs - just requires a little digging.

EDIT: Sourceforge is your second friend  smiley

kf-jpeg-fitsize - Fit jpeg to a maximum filesize. Reduce jpeg quality to fit that file size.

Requires two more free programs to work, (it's actually a batch file which uses them), but the price is right - the images need to be resized first before running the batch file over them.

Another EDIT: DOH!  I just realised I already have a program on my computer that does this only it doesn't copy the EXIF info, (to expand: Analyzer copies EXIF data, however the Batch plugin loses it - I've just sent an email asking if he can implement it).
Image Analyzer with the Batch Plugin.  Image Analyzer is free, the unrestricted Batch Plugin is Donationware - donate what you like and you'll get the version that doesn't add a small watermark to your pics, (I donated ages ago to have the ability to DeSkew a lot of pics - still use it occasionally because it can handle maths expressions in the batch files).

eg. To scale and save as you were after, the batch file is, (could probably do a lot of tweaking for max image quality, etc):

SkipNextIf(Width>Height)
  goto(@ShortWidth)

SkipNextIf(Height<1001)
  Resize(round(1000*(Width/Height)),1000,Pixel)
goto(@SaveIt)

@ShortWidth
SkipNextIf(Width<1001)
  Resize(1000,round(1000*(Height/Width)),Pixel)

@SaveIt
SetJPEGQuality(100)
SetJPEGSizeLimit(1024000)
« Last Edit: May 04, 2008, 11:14:06 PM by 4wd » Logged

Four wheel drive: Helping you get stuck faster, harder, further from help...........and it's no different on this forum Evil
suleika
Supporting Member
**
Posts: 117


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: May 05, 2008, 06:41:02 AM »

Thanks for your post edits - there are programs to copy exif info across, I know, so it's not an absolute deal-breaker.  ImageAnalyzer itself looks interesting and the script works - definitely worth a look. 
Logged
PhilB66
Supporting Member
**
Posts: 1,510


View Profile Give some DonationCredits to this forum member
« Reply #12 on: May 10, 2008, 01:00:03 PM »

ImageTasks was mentioned before and so was VSO Image Resizer (discussed here).

Mobaphoto is another tool that supports batch processing (freeware and portable)


Logged
Curt
Supporting Member
**
Posts: 6,313

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #13 on: September 27, 2008, 05:15:33 AM »

The app "Multiple Image Resizer" (http://www.multipleimageresizer.net/) will easily do the scaling ...

I tried this one today, "MIR", Multiple Image Resizer, because I read a description of the features, and got interested. However, I must say I cannot understand why this particular Image Resizer will not tell the dimensions of the image to be resized. How can I calculate the percentage resizing of a picture, if I don't know the dimensions? Well, in fact I can imagine many situations where the lack of this obvious information, would keep me from even thinking about resizing  in the first place!

Besides, I never managed to get the program to work properly  anyway.
Tested, and removed.
« Last Edit: September 27, 2008, 05:18:43 AM by Curt » Logged
CWuestefeld
Supporting Member
**
Posts: 931



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #14 on: September 27, 2008, 10:05:34 AM »

I cannot understand why this particular Image Resizer will not tell the dimensions of the image to be resized. How can I calculate the percentage resizing of a picture, if I don't know the dimensions?
I'm not sure why you'd care to calculate the percentage. MIR is perfectly happy to be told to resize to some absolute dimensions, or even to fit the target into some bounding dimensions.

I think there's a good reason that MIR doesn't show the dimensions of your image. That's because the program is designed to operate on whole batches of images. In that context, there isn't any particular image whose dimensions it can point to; it's got a heap of images, each (potentially) having its own dimensions.
Logged



Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.048s | Server load: 0.28 ]