Al-200 Posted November 22, 2022 Posted November 22, 2022 Hi there, When I download a jpeg picture from the internet at 200Ko for example, if I resave it in Affinity v2 , it grows to 600ko. So 3 times bigger! But if I resave the last one, it grows from 600Ko to 620ko. It is usually better with webp files. Why is that and how to avoid it? Thanks. Quote
carl123 Posted November 22, 2022 Posted November 22, 2022 6 minutes ago, Al-200 said: if I resave it in Affinity v2 , it grows to 600ko When you say "resave" are you using File > Save or File > Export? File > Export will allow you to choose the compression level (Quality slider) File > Save does not so will always save at 100% quality (I think) which make the jpeg bigger It's best to always use File > Export Quote To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.
walt.farrell Posted November 22, 2022 Posted November 22, 2022 4 hours ago, carl123 said: File > Save does not so will always save at 100% quality (I think) Yes, I believe that's true. A JPG file does not record any definitive information about settings like Quality, and so there is no good way to get the same quality when re-saving. So, I think, Serif chose to use 100% to have the best chance of not losing any quality. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.5
Al-200 Posted November 22, 2022 Author Posted November 22, 2022 Thank you Carl and Walt for the replies! When I resave I use File > Export, and I keep 100% quality. But I think that 3 times bigger than the original size is weird, no? You can do the test by yourselves with small files around 200Ko-400Ko. walt.farrell 1 Quote
NotMyFault Posted November 22, 2022 Posted November 22, 2022 2 hours ago, Al-200 said: Thank you Carl and Walt for the replies! When I resave I use File > Export, and I keep 100% quality. But I think that 3 times bigger than the original size is weird, no? You can do the test by yourselves with small files around 200Ko-400Ko. You need to choose a lower quality setting to get smaller file size. 85% is a good starting point. Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
walt.farrell Posted November 22, 2022 Posted November 22, 2022 2 hours ago, Al-200 said: When I resave I use File > Export, For future reference, that is not a resave, it is an Export. Using proper terminology will help keep conversations on-track and meaningful, and avoid false starts and unproductive paths But now that we know what you're doing, I think you have your answer: lower the quality setting. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.5
thomaso Posted November 22, 2022 Posted November 22, 2022 10 hours ago, walt.farrell said: A JPG file does not record any definitive information about settings like Quality, and so there is no good way to get the same quality when re-saving. So, I think, Serif chose to use 100% to have the best chance of not losing any quality. Do you have an idea how other apps solve this problem? It appears the macOS Preview.app saves an opened JPG in quite the same file size when a tiny detail gets altered (e.g. flip) – whereas Affinity seems to save the same file in a size according to its 100% compression quality. And, just curious: Would theoretically the subsampling info in the metadata allow Affinity to choose a compression a little closer to the initial file – rather than choosing 100% by default? It seems there are at least two variants saved with a JPG, for instance: Quality 100% – Sub Sampling YCbCr 4:4:4 (1 1) – 77 kB Quality 60% – Sub Sampling YCbCr 4:4:4 (1 1) – 10 kB –––––– Quality 50% – Sub Sampling YCbCr 4:2:0 (2 2) – 7 kB Quality 10% – Sub Sampling YCbCr 4:2:0 (2 2) – 4 kB Quote • MacBookPro Retina 15" | macOS 10.14.6 | Eizo 27" | Affinity V1 • iPad 10.Gen. | iOS 18.5. | Affinity V2.6
walt.farrell Posted November 23, 2022 Posted November 23, 2022 1 hour ago, thomaso said: Do you have an idea how other apps solve this problem? No, I don't. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.5
carl123 Posted November 23, 2022 Posted November 23, 2022 6 hours ago, thomaso said: Do you have an idea how other apps solve this problem? This is a screenshot from Faststone Photo Resizer, for the output settings to JPG files... The key words appear to be "if possible" which suggests (to me) that some JPG files might have the original quality percentage embedded in the file somewhere and some may not thomaso 1 Quote To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.
NotMyFault Posted November 23, 2022 Posted November 23, 2022 6 hours ago, thomaso said: 17 hours ago, walt.farrell said: Do you have an idea how other apps solve this problem? It appears the macOS Preview.app saves an opened JPG in quite the same file size when a tiny detail gets altered (e.g. flip) – whereas Affinity seems to save the same file in a size according to its 100% compression qualit Some apps can do certain edits like crop or rotate without re-encoding. https://en.wikipedia.org/wiki/JPEG#Lossless_editing Lossless editing[edit] Several alterations to a JPEG image can be performed losslessly (that is, without recompression and the associated quality loss) as long as the image size is a multiple of 1 MCU block (Minimum Coded Unit) (usually 16 pixels in both directions, for 4:2:0 chroma subsampling). Utilities that implement this include: jpegtran and its GUI, Jpegcrop. IrfanView using "JPG Lossless Crop (PlugIn)" and "JPG Lossless Rotation (PlugIn)", which require installing the JPG_TRANSFORM plugin. FastStone Image Viewer using "Lossless Crop to File" and "JPEG Lossless Rotate". XnViewMP using "JPEG lossless transformations". ACDSee supports lossless rotation (but not lossless cropping) with its "Force lossless JPEG operations" option. Blocks can be rotated in 90-degree increments, flipped in the horizontal, vertical and diagonal axes and moved about in the image. Not all blocks from the original image need to be used in the modified one. thomaso 1 Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
NotMyFault Posted November 23, 2022 Posted November 23, 2022 The wikipedia pages about jpeg compression and JFIF format answer almost all questions which were discussed in this thread about quality, re-encoding, inability to read used parameters during encoding from JFIF file containers etc. Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
Al-200 Posted November 23, 2022 Author Posted November 23, 2022 Thank you all for your answers! - But I still don't understand why the file is 3 times bigger than the original. You can all just try it by yourselves. Because if I want to keep the same weight than the original, I should export it at 60% quality, and the result is awful... - And I don't understand why, when I do a 2nd export (from the 1st one), the weight doesn't change much. Quote
walt.farrell Posted November 23, 2022 Posted November 23, 2022 1 hour ago, Al-200 said: But I still don't understand why the file is 3 times bigger than the original. You can all just try it by yourselves. Because if I want to keep the same weight than the original, I should export it at 60% quality, and the result is awful... Repeated saving of a JPG file always lowers the quality, and that's true even if you save with the Quality setting set to 100, because JPG uses a lossy compression technique where data is discarded to make the file smaller. So, for example, it is possible that your "original" JPG was saved from a TIFF or some other higher-quality image. And it might have been saved at 80% quality, and looked fine to the creator of the file. Now you have a file that has only 80% of the "quality" of the true original. You can export that at 100% quality and get something much bigger, trying to retain everything from that 2nd-generation JPG you started with. And that will be much bigger. Or you can try reducing the quality again. So, you might try 80%, but note that this is not 80% of the original but 80% of 80% of the original. Maybe that will work. Or maybe it won't. And it really depends on the contents of the image. But on the other hand, I have read here in the forums that there are other applications that do a better job of reducing the size of JPG images than the Affinity apps do. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.5
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.