Posts: 4
Threads: 1
Joined: Apr 2017
Reputation:
0
Operating system(s):
04-21-2017, 09:41 AM
(This post was last modified: 04-21-2017, 09:42 AM by TheBrassGlass.)
Hey, guys;
I'm not having much luck finding anything about this online. I scan drawings with a machine that runs on Windows, save the images and upload them on a cloud image-hosting site, download them onto my Linux machine and edit them in GIMP. I recently switched to saving the images as TIFF files before uploading and transferring them over, but all of a sudden I noticed that if I convert the TIFF to JPEG, it doesn't matter what the resolution is, GIMP automatically will change it to 72 dpi when I export the image as a JPEG.
I don't recall earlier versions of GIMP doing this, but I'm not sure as I only recently have been saving the images as TIFFs before converting them to JPEGs, whereas in the past I just saved as JPEG (I've been trying to avoid the artifacting that comes with working with JPEGs through multiple edits). So what gives? Is this a bug? Is there a patch or something I can install so that it doesn't do that anymore?
Thanks,
- jams
Posts: 851
Threads: 11
Joined: Oct 2016
Reputation:
89
Operating system(s):
- Windows (Vista and later)
Gimp version: 2.10
Think of a triangle.
At one apex you have a digital image. Size is measured in pixels.
At the second apex you have a printed (ie on printed on paper) image. Size is measured in inches.
At the third apex you have dpi. Used when determining print size for a digital image.
Given any two, you can calculate the third.
You are only working with digital images so the important thing is the image dimension in pixels. In a digital image the dpi is just a dormant value, only used when calculating print size (which your are not doing).
In Gimp, go to
Image > Print Size...
You can change the dpi there. Watch the print size change as you do this. The image size in pixels does not change when making changes here.
Posts: 7,179
Threads: 155
Joined: Oct 2016
Reputation:
1,008
Operating system(s):
Gimp version: 2.10
04-21-2017, 11:28 AM
(This post was last modified: 04-21-2017, 11:42 AM by rich2005.
Edit Reason: typo
)
The solution is as Blighty points out, go into Image -> Print Size and change the resolutions. This does not scale the image in any way but you will see the width and height adjust.
However, always a however
I can not reproduce that here. Gimp 2.8.20 Kubuntu 16.04
Scanning with xsane in a couple of different formats grey @ 300 ppi colour @ 200 ppi and
1. The correct ppi is reported by ImageMagick in both cases.
2. Gimp opens these with the correct ppi
It could be the format of the tiff file, There are many 'flavours' of tiff including compression. xsane saved both using jpeg compression. Maybe one of the alternatives gives a different result.
It is worth running one of your files through ImageMagick identify -verbose filename.tif just to see what is there. example:
Quote:Image: gray.tiff
Format: TIFF (Tagged Image File Format)
Mime type: image/tiff
Class: DirectClass
Geometry: 2320x3468+0+0
Resolution: 300x300
Print size: 7.73333x11.56
Units: PixelsPerInch
Type: Grayscale
- - - - - - -
edit: Nope, no change, tried uncompressed tiff and a packbits tiff. Open in Gimp, export to jpeg and the original ppi stays the same.
Posts: 301
Threads: 12
Joined: Oct 2016
Reputation:
16
Operating system(s):
- Windows (Vista and later)
Gimp version: 2.10
I also can't replicate this problem, using a multifunction scanner/printer, creates a TIFF with the dpi set to 200
Using GIMP 2.8.20 on Windows 7 64bit it exports a .jpg which Windows file properties and GIMP report as 200dpi
Are you sure the TIFF you download from your "cloud image-hosting site" is still 200dpi before you load it into GIMP?
Posts: 7,179
Threads: 155
Joined: Oct 2016
Reputation:
1,008
Operating system(s):
Gimp version: 2.10
(04-21-2017, 12:01 PM)Kevin Wrote: ....Are you sure the TIFF you download from your "cloud image-hosting site" is still 200dpi before you load it into GIMP?
That is what I was thinking, or possibly an attached 'thumbnail' @ 96ppi Either way ImageMagick should give the info.
Posts: 4
Threads: 1
Joined: Apr 2017
Reputation:
0
Operating system(s):
Yes, I can confirm that when I download it from the cloud site, it is at 300 dpi. In fact, saving it as the GIMP native file (.xcf), it is still 300 dpi. But if I export as JPEG, it becomes 72 dpi. I do not understand why this is.
I will try doing as you say with print size.
Posts: 7,179
Threads: 155
Joined: Oct 2016
Reputation:
1,008
Operating system(s):
Gimp version: 2.10
(04-22-2017, 04:44 AM)TheBrassGlass Wrote: Yes, I can confirm that when I download it from the cloud site, it is at 300 dpi. In fact, saving it as the GIMP native file (.xcf), it is still 300 dpi. But if I export as JPEG, it becomes 72 dpi. I do not understand why this is.
I will try doing as you say with print size.
Since a saved .xcf is at the higher ppi then probably setting the print size is not going to work. It will already be set to that value.
It then goes back to:
Somewhere in the procedure you use to export a jpeg.
For example a higher ppi image copied/imported into a lower ppi image takes the ppi of the lower ppi. But from your description you just open a tiff and then export to jpeg so a question there.
How you determine that the exported jpeg is at 72 ppi.
Try some other application than Gimp. ImageMagick or there is an XnViewMP for linux.
A possible bug in the versions of linux / Gimp you use.
You could try resetting your Gimp back to defaults see if that makes a difference. If your linux has a forum ask the question there.
Posts: 4
Threads: 1
Joined: Apr 2017
Reputation:
0
Operating system(s):
04-22-2017, 04:51 PM
(This post was last modified: 04-22-2017, 04:51 PM by TheBrassGlass.)
Quote:How you determine that the exported jpeg is at 72 ppi.
The JPEG was a noticeably smaller size, so I opened it up in GIMP and went to "Image>Resize image" and it is showing up there as 72 dpi. But I mean, you know the TIFF is 17 MB and when I export as JPEG, it's 1 MB so that was initially what alerted me that something hokey was going on. Of course the JPEG would be a smaller image size, but at 100% image quality and no compression, I expected the JPEG file to be at least a bit larger.
I will try the Linux forums.
Posts: 166
Threads: 34
Joined: Jan 2017
Reputation:
8
Operating system(s):
I think the displayed dpi or ppi is a red herring! If when you carry out the conversion from TIFF to JPEG (without scaling the image) you have the same number of pixels, that is all that matters.
When printing the image, if you adjust the size to fit your paper that will automatically adjust the dpi to suit.
david.
Posts: 7,179
Threads: 155
Joined: Oct 2016
Reputation:
1,008
Operating system(s):
Gimp version: 2.10
04-22-2017, 07:18 PM
(This post was last modified: 04-22-2017, 07:28 PM by rich2005.)
I might have found the problem, but it needs confirmation. Using my Bodhi linux netbook and the battery is running low.
Exporting a jpeg with 'Save Thumbnail' enabled in Advanced Options produces a 72 dpi jpeg.
@brassglass
Try:
1. In your Gimp profile ~/.gimp-2.8 delete the file parasiterc - this where where the export options are saved.
2. Make sure when exporting Save Thumbnail is not enabled.
edit: running the '72 ppi' through Imagemagick identify and the ppi is reported correctly, strange.
|