Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About compressing digital images for storage
#1
Hi all

I'm going to scan about 1,000 photos to digital images.  On testing I found the size of each digital image is about 2.0MB.  

I can compress its size to about half, 1.1MB on GIMP;
File -> Export As -> Select File Type (By Extension)
file type - jpg
-> Export
Export Image as JPEG
Quality --> 85

The final compressed size of the digital image = 1.1MB

Would the compressed image files affect their future use?  I won't print them but use them on digital album, digital slideshow, posting on websites etc.

Please advice.

Besides I'll further compress and archive all digital files running "gzip"

Thanks

Regards
Reply
#2
(06-13-2022, 07:18 AM)Stephen Liu Wrote: Hi all

I'm going to scan about 1,000 photos to digital images.  On testing I found the size of each digital image is about 2.0MB.  

I can compress its size to about half, 1.1MB on GIMP;
File -> Export As -> Select File Type (By Extension)
file type - jpg
-> Export
Export Image as JPEG
Quality --> 85

The final compressed size of the digital image = 1.1MB

Would the compressed image files affect their future use?  I won't print them but use them on digital album, digital slideshow, posting on websites etc.

Please advice.

This type of compression, definitively yes, you will never get back information's loss.
JPEG is a lossy format that offers a higher compression rate than PNG in the trade-off for quality ➤ you are trading quality for smaller size with jpg, in other words, smaller a jpg is ➤ less quality from the original it has

(06-13-2022, 07:18 AM)Stephen Liu Wrote: Besides I'll further compress and archive all digital files running "gzip"

Thanks

Regards

This type of compression, no, it's a completely different type of compression https://www.youtube.com/watch?v=Mjab_aZsdxw
I would use 7z to compress instead of gzip, let say it's a personal choice. https://en.wikipedia.org/wiki/7z
Reply
#3
(06-13-2022, 07:33 AM)PixLab Wrote:
(06-13-2022, 07:18 AM)Stephen Liu Wrote: Hi all

I'm going to scan about 1,000 photos to digital images.  On testing I found the size of each digital image is about 2.0MB.  

I can compress its size to about half, 1.1MB on GIMP;
File -> Export As -> Select File Type (By Extension)
file type - jpg
-> Export
Export Image as JPEG
Quality --> 85

The final compressed size of the digital image = 1.1MB

Would the compressed image files affect their future use?  I won't print them but use them on digital album, digital slideshow, posting on websites etc.

Please advice.

This type of compression, definitively yes, you will never get back information's loss.
JPEG is a lossy format that offers a higher compression rate than PNG in the trade-off for quality ➤ you are trading quality for smaller size with jpg, in other words, smaller a jpg is ➤ less quality from the original it has

(06-13-2022, 07:18 AM)Stephen Liu Wrote: Besides I'll further compress and archive all digital files running "gzip"

Thanks

Regards

This type of compression, no, it's a completely different type of compression https://www.youtube.com/watch?v=Mjab_aZsdxw
I would use 7z to compress instead of gzip, let say it's a personal choice. https://en.wikipedia.org/wiki/7z
Thanks for your advice

On smartphone scanning photos, the format of the output digital files is .jpg.  I'll try the second time later to check whether I can select the output format as .png

I have another though not compressing the digital files on GIMP only with gzip or 7z

I don't have 7zzip running Ubuntu 20.04.  I'll run snap to install it later.

$ sudo snap install p7zip-desktop

Regards
Reply
#4
Hi PixLab again,

It is impossible saving the photos as .png format

How to make the stock camera save pictures as png
https://forum.xda-developers.com/t/how-t...g.4257423/
Please refers to #7
currently there is no way, even if it is technically possible, to save photos as png direct from camera. convert them or take screenshot of them.

If it is necessary to run 7z on .png files not on .jpeg files, I can convert all .jpeg files to .png files running;
$ mogrify -format png *.jpeg && rm *.jpeg

Regards
Reply
#5
If the jpeg from your phone camera is anything like mine then the compression setting is 95.  You can check by using  identify -verbose filename.jpg There is a compression value in the listing.

A bit about jpeg, it is a lossy format, even a 99 setting is compressed and lossy. The jpeg compression -> file size curve is not linear. Not much visible loss in quality down to about 80 but can be a good saving in file size Below 50 big drop off in quality, less saving in file size.

You can get an estimate of file size when exporting a jpeg. Enable the "Show preview in image window" 

   

PNG is a lossless format. Smaller compression = larger file size. 9 is default and best compression. It can govern how fast a large image loads. Smaller (lower value) compression loads faster. No difference in the image.

There are other formats, TIFF for example, but you are starting with a jpeg, you might as well continue. You will not save much space by packing jpeg/png files to an archive, they are already well compressed but 7zip is a good choice.
Reply
#6
Indeed, like said @rich2005 if it's jpg, no need to convert to png, just stay jpg.

If it was me (in theory), I'll just put all original jpg (from your phone) in a directory, right click on the directory then select "create archive", (or "compress" on Ubuntu? OMG 1 week on MX Linux and I don't really remember what's on the right click on Ubuntu-MATE Confused )
Then another directory for all the post-processed one, and same right click on it "create archive" or "compress", and store those 2 archives on an external drive.

In reality, I don't compress, I just store the full directories of raw/ photos and post processed jpg on external drive, because I can see the thumbnail, and in 10 years from now I know for a fact that I will not be happy about the jpg, then I will re-process some of the raw... or not Big Grin
Reply
#7
(06-13-2022, 11:57 AM)rich2005 Wrote: If the jpeg from your phone camera is anything like mine then the compression setting is 95.  You can check by using  identify -verbose filename.jpg There is a compression value in the listing.

A bit about jpeg, it is a lossy format, even a 99 setting is compressed and lossy. The jpeg compression -> file size curve is not linear. Not much visible loss in quality down to about 80 but can be a good saving in file size Below 50 big drop off in quality, less saving in file size.

You can get an estimate of file size when exporting a jpeg. Enable the "Show preview in image window" 



PNG is a lossless format. Smaller compression = larger file size. 9 is default and best compression. It can govern how fast a large image loads. Smaller compression loads faster. 

There are other formats, TIFF for example, but you are starting with a jpeg, you might as well continue. You will not much space by packing jpeg/png files to an archive, they are already well compressed but 7zip is a good choice.

I can reduce the original .jpeg file size to almost half, from 2.0MB to 1.1MB by selecting the Export Quality to 80%.  What I'm most concerned are their future applications.  I can select the Export Quality 95% but there is not much difference in the file size compared to its original size.

Now I'm investing whether I can crop the digital images in batch, instead of cropping them one-by-one on GIMP.  Technically it is possible by running IM command, "resize".  But the area which I need to crop off is on the right-hand side of the image.  Please see attached photos.

A further thought
I can position the photo in the center below the smartphone, i.e. the space to be removed being on the left-hand and right-hand sides of equal size.

Other advice noted and thanks

Regards

(06-13-2022, 01:09 PM)PixLab Wrote: Indeed, like said @rich2005 if it's jpg, no need to convert to png, just stay jpg.

If it was me (in theory), I'll just put all original jpg (from your phone) in a directory, right click on the directory then select "create archive", (or "compress" on Ubuntu? OMG 1 week on MX Linux and I don't really remember what's on the right click on Ubuntu-MATE  Confused )
Then another directory for all the post-processed one, and same right click on it "create archive" or "compress", and store those 2 archives on an external drive.

In reality, I don't compress, I just store the full directories of raw/ photos and post processed jpg on external drive, because I can see the thumbnail, and in 10 years from now I know for a fact that I will not be happy about the jpg, then I will re-process some of the raw... or not Big Grin
I'll consider your advice, not compressing the original export files first, to see how much storage space will be occupied.  I have 4TB capacity on the storage drive (WD hard-drive)

I also have an external 4TB drive, connected to the PC via USB cable. I wonder whether needing compressing the files before transferring them to the external drive.  If without compression it will take longer time to transfer.

I'm running remote shooting, all operations controlled on Ubuntu 20.04 PC display.  After capturing each photo, I'll immediately download it to a folder on the PC, specially created, and rename its filename according to my way of labeling, not according to the filename allotted by the smartphone, together with comment added if any.

Regards


Attached Files Thumbnail(s)
   
Reply
#8
For compressing your digital images, your method using GIMP is effective, and exporting at quality 80% usually strikes a good balance between size and visual quality. If you’re looking for further compression, you can try using online jpeg compressor tool. It allows you to compress multiple images while preserving quality. Since you won't be printing, the quality reduction should be fine for digital use.
Reply
#9
@ nehakakar

You do realise you are replying to a two year old post and it does not add much to the topic. Please consider before posting your comments.
Reply


Forum Jump: