Converting a tiff file to jpeg without increasing filesize
Posted: 2016-03-24T12:05:58-07:00
Hello,
I'm trying to convert a lot (millions) of tiff files to jpegs without increasing the filesize too much. Here is an example conversion:
So I'm seeing more than a 20x increase in filesize. Ideally I'd keep the filesize roughly the same. I'm very new to any of this stuff, but I have figured out that the tif image has "group 4" compression. I don't really see anything comparable for jpeg. What I'm mainly wondering is the following:
1) Are there standard methods to doing the conversion and roughly keeping the filesizes the same or do most people just fiddle with the quality values until they find something the like? I guess I could just convert random samples with different qualities set and look at blowup in size compared to visual image quality, but hopefully I can avoid that.
2) Is there a better image format (i.e. not jpeg) for this sort of thing? I want to display the images on a webpage which is why I'm converting them, but I honestly don't care much which image format as long as it will render on major browsers.
Thanks a lot for any wisdom!
I'm trying to convert a lot (millions) of tiff files to jpegs without increasing the filesize too much. Here is an example conversion:
Code: Select all
$ convert img.tif img.jpeg
$ du -b img*
214377 img.jpeg
9655 img.tif
1) Are there standard methods to doing the conversion and roughly keeping the filesizes the same or do most people just fiddle with the quality values until they find something the like? I guess I could just convert random samples with different qualities set and look at blowup in size compared to visual image quality, but hopefully I can avoid that.
2) Is there a better image format (i.e. not jpeg) for this sort of thing? I want to display the images on a webpage which is why I'm converting them, but I honestly don't care much which image format as long as it will render on major browsers.
Thanks a lot for any wisdom!