How to maintain file size when exporting images

Started by BaliDave, January 08, 2019, 06:05:41 AM

Previous topic - Next topic

BaliDave

I want to maintain the same file size (in bytes) when exporting images but rename them using a sequence number from the category (i.e. an album).   The pics are from 2 or more sources, e.g. phone and camera, and they have different EXIF info about their resolution, and many are cropped, ...  Now when I try  to export them in the batch processor with "don't resize", many wind up 4-5 times bigger file size than the original file, and almost all at least twice the size, e.g. a 3MB file winds up at 12MB. 

Anyhow I don't see a way to do this -- basically a copy combined with a renaming based on sequencing stuck in there.

Any ideas? Or am I missing something?

Mario

#1
I don't understand.
What do you mean by "file size". Do you mean the size of the files on disk? The number of bytes the file occupies?

If so, this depends on the file format you are using for export and the quality settings (for the lossy file formats like JPEG).
If you output JPEG, check the quality setting. 85% gives usually the best ratio between quality and file size. A value of 60% may reduce the file size by up to 40%, with a bit of loss in the overall image quality. If your images come from a smart phone, you probably won't notice this.
And also on the amount of metadata embedded in the output file.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

BaliDave

Yes, it's file size in bytes that's my concern.  At least something close.  Ideally it'd be good to just have a copy of the existing file, but just with a different name as specified.  Now with the default setting for "Export to JPEG, 100%, medium sharpen" for my jpeg's, I'm getting much bigger file sizes (2-5 times).  I was looking for some way to just specify "copy as is", but couldn't find it.
Thanks.

Mario

The Batch Processor does a lot more than copying files. Its designed for file format conversions, resizing, recompression, effects etc.
100% of course will produce very large files. Try with 80% for a much reduced file size and only slightly less quality.

If you want is to copy a file in IMatch, use drag & drop or copy & paste or drag to Windows Explorer.

File Management in IMatch

You can use the The Renamer to copy files and rename them at the same time.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ColinIM

Quote from: BaliDave on January 08, 2019, 01:40:37 PM
(....) Now with the default setting for "Export to JPEG, 100%, medium sharpen" for my jpeg's, I'm getting much bigger file sizes (2-5 times).(....)
Hi BaliDave,

Keep in mind that when we use any amount of sharpening on an image, and then save or RE-save the image as a JPEG, each 'collection' of pixels in that image that has 'benefited' from our sharpening (for example an edge or a margin in the image) will be interpreted by the JPEG compression algorithm as (shall we say ...) "additional detail that must also be represented in the compressed version of the image".

Or to put it more simply  ;D  for any given Quality setting, or level of compression, the sharpened version of a JPEG image will (more often than not) have a larger filesize than the un-sharpened version of the same image.

I'd agree that this additional sharpening shouldn't cause your sharpened version to be 2-5 times larger than your original but, (I suggest) if you skipped the extra sharpening then it might help to keep the 'Output' filesizes a little smaller.

Just a thought.

jch2103

It sounds like using just the Renamer would be closer to what you want without using the Batch Processor at all; that will just produce an identical copy of the image with a different name.
John

BaliDave

Thanks all, it sounds like the Renamer is probably what I need using the Copy file action in it.  But the Renamer not only generates the copy with the name I want in the desired folder, but it renames the original file, at least the way I'm using it (see attached).  Am I missing something?   Is there a way to avoid renaming the original file, and just rename the copy?  [Note that I'm using the custom order number in the renaming, so copying first would smash the ordering desired.]

[Ignore this section below if there's a way to "just rename the copy"] 
Perhaps my objectives will be clearer with this explanation  :  I put files in some categories with each category corresponding to an "album" I want.  Note that some files may be in multiple albums (i.e. categories).  I reorder the arrangement in each category to the order I want them to appear in this album, i.e. a custom sort.  I want the copies to have the same name as the file but with a prepended sort order, so I use the File Number.  This all works now but it renames the original file too, which is not what I want.


jch2103

See the IMatch Help (F1), specifically the Copy portion.

Check the Copy option in the Renamer; the first option is Destination Folder. If you set that, your renamed files should be copied there while your originals remain untouched. Run the Preview to try it out. Do try this on a test first, though!

John

BaliDave

jch2103:  Thanks but I did that test using the copy option, and it renamed both the original files where they were and in the destination folder.  I did it twice to make sure.  I was a bit surprised that it did that -- maybe a bug? 

Mario

#9
If you just want to copy a file, why don't you use copy/paste? Select the files, press <Ctrl>+<C>. Switch to the target folder, press <Ctrl>+<V>. Then maybe run the Renamer to rename the files to whatever naming schema you need.
If the target folder is not in your IMatch database, select the files to copy in a File Window and then drag them to Windows Explorer (hold down <Ctrl> to make it a copy, not a move operation).

The purpose of the Renamer is to rename files.
If you want to use it to just copy files, make sure your first step is the original file name, then the copy step.
The Renamer has no feature that could be explained as "Copy a file to this folder and rename it to this". The Renamer always renames the selected files, not the copies in the target folder of the optional copy step. If this is what you want, first copy the files to the target folder, then rename them there with the Renamer.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

BaliDave

Mario,  Thanks, I'll do that. 

I was hoping just to be able to rename the copies.  Since copying destroys the custom sort order that I've set up in the category, I'll need to redo the order there in order to get the sequence number in front like I want.  This is needed when I'm exporting these files from IMatch in order to be viewed in the same order as I had set up by other software (e.g. doing a Picasa slideshow -- it also shows videos).

Anyhow I'll do that.
Thanks,
Dave