Size of output files
This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
Size of output files | Alan Barnett | 27 Feb 13:03 |
Size of output files | Alan Barnett | 27 Feb 14:26 |
Size of output files | Owen Cook | 27 Feb 22:38 |
Size of output files | Alan Barnett | 02 Mar 01:57 |
Size of output files | Ofnuts | 27 Feb 21:52 |
Size of output files
I'm using gimp to increase the contrast of scanned documents. The
scanned images were combined into a multi-page pdf. The images are
music scores; the originals are RGB, but only grayscale information is
important.
I opened the input pdf as layers with a resolution of 300 dpi, changed
the brightness and contrast of each layer, and exported the images as a
.mng file. I then used ImageMagick to convert the nmg back to .pdf format.
I've done this with two different sets of images. For the first set of images, the input .pdf files are about 2 Mb, and the output .mng and .pdf are both about 4 Mb; the process increases the size of the files by a factor of 2.
For the second set of images, the input pdf files are about 5 MB, and the output .mng and .pdf files are both about 45 MB, an increase of a factor of 9!
Any suggestions how to decrease the size of the output files? Any ideas about why the large difference in the size increase between the two sets of images. (The first set were scanned by me on an EPSON 1640SU scanner, the second set were scanned by someone else on a scanner unknown to me.)
Thanks in advance for any suggestions.
Alan
Size of output files
I loaded the "output" pdf files back into GIMP, and I noticed a difference in the page size.
When I read in the "input" pdfs, GIMP lists the page size as ~ 8.5" x 11" for both sets of files. When I read the output pdf files back into GIMP, GIMP lists the same page size for the first set, but a page size of ~35" x 49" for the second (larger file) set. Why does GIMP change the page size when it exports the second set, and how do I stop it?
On 02/27/2015 08:03 AM, Alan Barnett wrote:
I'm using gimp to increase the contrast of scanned documents. The scanned images were combined into a multi-page pdf. The images are music scores; the originals are RGB, but only grayscale information is important.
I opened the input pdf as layers with a resolution of 300 dpi, changed the brightness and contrast of each layer, and exported the images as a .mng file. I then used ImageMagick to convert the nmg back to .pdf format.I've done this with two different sets of images. For the first set of images, the input .pdf files are about 2 Mb, and the output .mng and .pdf are both about 4 Mb; the process increases the size of the files by a factor of 2.
For the second set of images, the input pdf files are about 5 MB, and the output .mng and .pdf files are both about 45 MB, an increase of a factor of 9!
Any suggestions how to decrease the size of the output files? Any ideas about why the large difference in the size increase between the two sets of images. (The first set were scanned by me on an EPSON 1640SU scanner, the second set were scanned by someone else on a scanner unknown to me.)
Thanks in advance for any suggestions.
Alan
_______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list
Size of output files
On 27/02/15 14:03, Alan Barnett wrote:
I'm using gimp to increase the contrast of scanned documents. The scanned images were combined into a multi-page pdf. The images are music scores; the originals are RGB, but only grayscale information is important.
I opened the input pdf as layers with a resolution of 300 dpi, changed the brightness and contrast of each layer, and exported the images as a .mng file. I then used ImageMagick to convert the nmg back to .pdf format.I've done this with two different sets of images. For the first set of images, the input .pdf files are about 2 Mb, and the output .mng and .pdf are both about 4 Mb; the process increases the size of the files by a factor of 2.
For the second set of images, the input pdf files are about 5 MB, and the output .mng and .pdf files are both about 45 MB, an increase of a factor of 9!
Any suggestions how to decrease the size of the output files? Any ideas about why the large difference in the size increase between the two sets of images. (The first set were scanned by me on an EPSON 1640SU scanner, the second set were scanned by someone else on a scanner unknown to me.)
The file size is related to the size of the image in pixels, not to its physical size (which depends on print defintion)
Also, in the PNG format (and AFAIK MNG is a PNG derivative) there is no compression of random data, so color uniformity is important to keep size to a minimum.
An album of three pictures(*) on IMGUR:
- The one where the background is pure white is 4K. - Rather visible solid noise added to the clean image increases it to 20K - Barely visible HSV noise added to the clean image increases it to 30K
So some pos-tprocessing to cleanup your background may have the required effect. Thresholding would be perfect for the final size but would be ugly. High contrast could do it, or a more fine-tuned Curves setting. A de-speckling filter could also help.
(*) Anyone recognizes the song?
Size of output files
I think you are doing it all wrong.
To answer your last question first, you will probably find the dpi has gone from 300 to 72 dpi (or of that order)
Secondly, I don't quite understand what was done. Was the whole score saved as a multipage pdf, if so, can you break it up with pdftk or pdfseparate, get the individual sheets?
You might be able to use pdfimages to extract the embedded image and work on that.
If you want to convert it back to one pdf, use imagemagicks convert and its million options
Owen
If so
Sent: Saturday, February 28, 2015 at 1:26 AM From: "Alan Barnett"
To: gimp-user-list@gnome.org
Subject: Re: [Gimp-user] Size of output filesI loaded the "output" pdf files back into GIMP, and I noticed a difference in the page size.
When I read in the "input" pdfs, GIMP lists the page size as ~ 8.5" x 11" for both sets of files. When I read the output pdf files back into GIMP, GIMP lists the same page size for the first set, but a page size of ~35" x 49" for the second (larger file) set. Why does GIMP change the page size when it exports the second set, and how do I stop it?
On 02/27/2015 08:03 AM, Alan Barnett wrote:
I'm using gimp to increase the contrast of scanned documents. The scanned images were combined into a multi-page pdf. The images are music scores; the originals are RGB, but only grayscale information is important.
I opened the input pdf as layers with a resolution of 300 dpi, changed the brightness and contrast of each layer, and exported the images as a .mng file. I then used ImageMagick to convert the nmg back to .pdf format.I've done this with two different sets of images. For the first set of images, the input .pdf files are about 2 Mb, and the output .mng and .pdf are both about 4 Mb; the process increases the size of the files by a factor of 2.
For the second set of images, the input pdf files are about 5 MB, and the output .mng and .pdf files are both about 45 MB, an increase of a factor of 9!
Any suggestions how to decrease the size of the output files? Any ideas about why the large difference in the size increase between the two sets of images. (The first set were scanned by me on an EPSON 1640SU scanner, the second set were scanned by someone else on a scanner unknown to me.)
Thanks in advance for any suggestions.
Alan
_______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list_______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list
Size of output files
On 02/27/2015 05:38 PM, Owen Cook wrote:
I think you are doing it all wrong.
I followed the procedure described in this link.
To answer your last question first, you will probably find the dpi has gone from 300 to 72 dpi (or of that order)
No, the dpi remained 300.
GIMP reads the pdf as a multi-layer image. I read the PDF at 300 pixels
per inch resolution. While I'm editing the images, GIMP thinks each
layer is 8.5" x 11.69", or 2550x3508 pixels.
I save the pdf as mng, so each layer is a frame. I can't read the mng
files, so I don't know how big the pages are. After I convert the mng
files back to dpf and read the PDFs in GIMP, if I read the files at 300
pixel per inch resolution, the images are 35.42" x 48.61", or 10625 x
14583 pixels. I don't know why GIMP changes the resolution of the
images from 2550x3508 to 10625x14583 when it exports the images.
The odd thing is this behavior only occurs on PDFs I was given. For multipage PDFs that I create from images I scan myself, the procedure works as expected, and, when read into GIMP, the pages in the final edited PDFs are the same resolution as the source pdfs read at 300 pixel per inch resolution.
Secondly, I don't quite understand what was done. Was the whole score saved as a multipage pdf, if so, can you break it up with pdftk or pdfseparate, get the individual sheets?
You might be able to use pdfimages to extract the embedded image and work on that.
If you want to convert it back to one pdf, use imagemagicks convert and its million options
Owen
If so
Sent: Saturday, February 28, 2015 at 1:26 AM From: "Alan Barnett"
To: gimp-user-list@gnome.org
Subject: Re: [Gimp-user] Size of output filesI loaded the "output" pdf files back into GIMP, and I noticed a difference in the page size.
When I read in the "input" pdfs, GIMP lists the page size as ~ 8.5" x 11" for both sets of files. When I read the output pdf files back into GIMP, GIMP lists the same page size for the first set, but a page size of ~35" x 49" for the second (larger file) set. Why does GIMP change the page size when it exports the second set, and how do I stop it?
On 02/27/2015 08:03 AM, Alan Barnett wrote:
I'm using gimp to increase the contrast of scanned documents. The scanned images were combined into a multi-page pdf. The images are music scores; the originals are RGB, but only grayscale information is important.
I opened the input pdf as layers with a resolution of 300 dpi, changed the brightness and contrast of each layer, and exported the images as a .mng file. I then used ImageMagick to convert the nmg back to .pdf format.I've done this with two different sets of images. For the first set of images, the input .pdf files are about 2 Mb, and the output .mng and .pdf are both about 4 Mb; the process increases the size of the files by a factor of 2.
For the second set of images, the input pdf files are about 5 MB, and the output .mng and .pdf files are both about 45 MB, an increase of a factor of 9!
Any suggestions how to decrease the size of the output files? Any ideas about why the large difference in the size increase between the two sets of images. (The first set were scanned by me on an EPSON 1640SU scanner, the second set were scanned by someone else on a scanner unknown to me.)
Thanks in advance for any suggestions.
Alan
_______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list_______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list