I'm trying to save a TIFF file using JPEG compression, but the option is greyed out for me when I try to "Save As...".
I've tried flattening the image beforehand and still no luck.
I'm on Photoshop 22.1.1 Windows 10 64-bit
Some background info: I'm editing TIFF files that use JPEG compression (~200mb, 20000x20000 pixels), but when I re-save using no compression, LZW, or ZIP I'm getting file sizes 900MB+ with layers discarded! I was expecting the file size to go up a bit, but not this much. I've tried to save the TIFF to JPEG post-edits and that gets me down to around the 200MB range, then I open the JPEG to save to TIFF using no compression and the file size goes back to around 800-900MB. That bit confuses me too... Should a JPEG file saved to TIFF increase it's file size that drastically?
How to, Import and export, Problem or error, Windows
Yeah, I understand JPG compression on a TIFF doesn't make the best sense, but it's becaues the original files are GeoTIFFs with accompanying .tfw files so the end goal is to still have them as .tif format so that they can still be associated wth the georeferencing metadata. Pretty much, a lossless image quality isn't the number one priority, I suppose.
And, no that's what's bizarre. If I save the original file to an uncompressed TIFF file (so going from JPG compressed TIFF to uncompressed TIFF) then open that new file and "save as", the option to save as a TIFF with JPG compression is available so it's definitely something with the original file format. I just can't figure it out. No changes to colour mode is being made, which would be the only thing I can think of that would affect that.
That's what jpeg compression does. It reduces the size on disk. When you open it, it is decoded/decompressed and goes back to its former size.
But not the former quality! Jpeg compression is destructive, non-reversible and cumulative. Every new resave degrades the data. Don't resave a jpeg if you can avoid it. Jpeg is a delivery format for low bandwidth, not a working archive format.
A file format is a storage container. It doesn't apply when the file is open, then the file doesn't have a file format at all. It's just a pixel array in memory.
Should a JPEG file saved to TIFF increase it's file size that drastically?
Just reinforcing the point that the file size did not ”increase drastically.“ The reason is that the uncompressed TIFF file size is the native, natural file size. Any version of it with a smaller file size has been compromised in one way or another to make it take up less storage space. Compromised in terms of quality (JPEG) or less space savings and more time to save (ZIP).
If a computer programmer wrote a program from scratch to store your 20000 px x 20000 px image, they would naturally think:
The image is 20000 px by 20000 px, that’s 400,000,000 pixels, so it starts there.
If each pixel is 8 bits, multiple above by 8 so the image now needs over 3 billion bits to store.
If the image is RGB, that’s three channels, so the image actually needs over 9 billion bits to store.
But we store images in bytes (8 bits to a byte), so dividing the above by 8, the image is 1.2 gigabytes (1.2 billion bytes).
And that is exactly what Photoshop tells us in Image Size, which reports the uncompressed size: 1.2GB.
That’s the natural size of that image, and that has nothing to do with Photoshop, you would get that in any application, because of the math above. To get any file size smaller than that needs some kind of compression, to make the file conveniently (but un-naturally) small.