TIFF File Resolution Change
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.
TIFF File Resolution Change | Kevin Myers | 09 Jan 08:52 |
TIFF File Resolution Change | Fred Bazolo | 09 Jan 13:14 |
TIFF File Resolution Change | Marc) (A.) (Lehmann | 09 Jan 17:15 |
TIFF File Resolution Change | Kevin Myers | 09 Jan 15:20 |
TIFF File Resolution Change | Fred Bazolo | 09 Jan 18:59 |
TIFF File Resolution Change | Jon Winters | 09 Jan 23:02 |
TIFF File Resolution Change | psyche@studio.imagemagick.org | 09 Jan 16:06 |
TIFF File Resolution Change | Kevin Myers | 09 Jan 23:40 |
TIFF File Resolution Change | Tim Arheit | 10 Jan 02:02 |
TIFF File Resolution Change
Hello,
Does anyone out there happen to know of a utility that can simply change the image resolution values that are imbedded in a TIFF file? For example, I would like to be able to change 200 dpi to 400 dpi and thereby reduce the output size of the image by half, while maintaining the same pixel count. I don't want to waste a bunch of time reading and writing the actual pixel data, rather just directly replace the resolution values instead.
Why would I want to do that? Well for one thing, it would just be handy sometimes to maintain relative image quality while changing the image size. But primarily I need this at the moment because it might allow me to work around a bug in gimp 1.2.4 that seems to be triggered by exceeding a certain physical dimension size limit for an image (NOT a maximum file size or pixel count)
I think that perhaps this can be accomplished with ImageMagick, but I don't seem to be able to figure out the proper command line parameters.
Thanks in advance for any ideas.
s/KAM
------------------------ Yahoo! Groups Sponsor ---------------------~--> Turn flat surfaces into speakers with the Soundbug. http://us.click.yahoo.com/QWAVSC/onCFAA/xGHJAA/e4wwlB/TM ---------------------------------------------------------------------~->
List archives: To unsubscribe send a blank message from the address you're subscribed to
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
TIFF File Resolution Change
hey Kevin,
Just do "Image" -> "Scale Image" and adjust the dpi accordingly. That seems to work.
Fred
On Wednesday 08 January 2003 23:52, Kevin Myers wrote:
Hello,
Does anyone out there happen to know of a utility that can simply change the image resolution values that are imbedded in a TIFF file? For example, I would like to be able to change 200 dpi to 400 dpi and thereby reduce the output size of the image by half, while maintaining the same pixel count. I don't want to waste a bunch of time reading and writing the actual pixel data, rather just directly replace the resolution values instead.
Why would I want to do that? Well for one thing, it would just be handy sometimes to maintain relative image quality while changing the image size. But primarily I need this at the moment because it might allow me to work around a bug in gimp 1.2.4 that seems to be triggered by exceeding a certain physical dimension size limit for an image (NOT a maximum file size or pixel count)
I think that perhaps this can be accomplished with ImageMagick, but I don't seem to be able to figure out the proper command line parameters.
Thanks in advance for any ideas.
s/KAM
TIFF File Resolution Change
But Fred, that requires me to load the image into the GIMP first, which I can't do because something about the image's physical dimension is too large. I need to adjust the resolution BEFORE loading into the GIMP...
s/KAM
----- Original Message -----
From: "Fred Bazolo"
To: "gimp users"
Sent: Thursday, January 09, 2003 6:14 AM
Subject: Re: [Gimp-user] TIFF File Resolution Change
hey Kevin,
Just do "Image" -> "Scale Image" and adjust the dpi accordingly. That seems
to
work.
Fred
On Wednesday 08 January 2003 23:52, Kevin Myers wrote:
Hello,
Does anyone out there happen to know of a utility that can simply change the image resolution values that are imbedded in a TIFF file? For
example,
I would like to be able to change 200 dpi to 400 dpi and thereby reduce
the
output size of the image by half, while maintaining the same pixel count. I don't want to waste a bunch of time reading and writing the actual pixel data, rather just directly replace the resolution values instead.
Why would I want to do that? Well for one thing, it would just be handy sometimes to maintain relative image quality while changing the image
size.
But primarily I need this at the moment because it might allow me to work around a bug in gimp 1.2.4 that seems to be triggered by exceeding a certain physical dimension size limit for an image (NOT a maximum file
size
or pixel count)
I think that perhaps this can be accomplished with ImageMagick, but I
don't
seem to be able to figure out the proper command line parameters.
Thanks in advance for any ideas.
s/KAM
TIFF File Resolution Change
would like to be able to change 200 dpi to 400 dpi
The resolution is meta-information. It will have no effect on the image size. If you want a half-size image to view with gimp, use convert:
convert -sample 50% image.tif new.tif
Sampling is relatively fast to using
convert -geometry 50% image.tif new.tif
but -geometry produces a better looking image.
TIFF File Resolution Change
On Thu, Jan 09, 2003 at 01:52:18AM -0600, Kevin Myers wrote:
I think that perhaps this can be accomplished with ImageMagick, but I don't seem to be able to figure out the proper command line parameters.
Well, you can't do it with ImageMagick ;) It does read the image in, and, since this is difficult in the general case, I doubt such a program exists.
TIFF File Resolution Change
Oops! Sorry Kevin! My brain took a wrong turn. ha!
Fred
On Thursday 09 January 2003 06:20, you wrote:
But Fred, that requires me to load the image into the GIMP first, which I can't do because something about the image's physical dimension is too large. I need to adjust the resolution BEFORE loading into the GIMP...
s/KAM
----- Original Message ----- From: "Fred Bazolo"
To: "gimp users"
Sent: Thursday, January 09, 2003 6:14 AM Subject: Re: [Gimp-user] TIFF File Resolution Changehey Kevin,
Just do "Image" -> "Scale Image" and adjust the dpi accordingly. That seems to
work.Fred
On Wednesday 08 January 2003 23:52, Kevin Myers wrote:
Hello,
Does anyone out there happen to know of a utility that can simply change the image resolution values that are imbedded in a TIFF file? For
example,
I would like to be able to change 200 dpi to 400 dpi and thereby reduce
the
output size of the image by half, while maintaining the same pixel count. I don't want to waste a bunch of time reading and writing the actual pixel data, rather just directly replace the resolution values instead.
Why would I want to do that? Well for one thing, it would just be handy sometimes to maintain relative image quality while changing the image
size.
But primarily I need this at the moment because it might allow me to work around a bug in gimp 1.2.4 that seems to be triggered by exceeding a certain physical dimension size limit for an image (NOT a maximum file
size
or pixel count)
I think that perhaps this can be accomplished with ImageMagick, but I
don't
seem to be able to figure out the proper command line parameters.
Thanks in advance for any ideas.
s/KAM
TIFF File Resolution Change
I think I found it over on the ImageMagick user list...
Try this:
mogrify -density 96 foo.tiff
Instead of 96 use whatever you want the resolution to be.
Good luck!
TIFF File Resolution Change
Thanks to Jon for the suggestion.
Jon's approach (using mogrify's -density option) does indeed result in the desired change to the file. I was surprised to find that this worked, since the docs indicate that -density only applies to decoding of PS and PDF files...?
Unfortunately using mogrify in this manner is quite slow for the very large images that I am working with. Obviously ImageMagick is loading the entire file then writing it right back out again. That's completely unnecessary when all I want to accomplish is to make a simple change to two metadata fields in the header for the image in the tiff file.
At the moment I'm considering modifying tiffset (a simple utility supplied with libtiff) to give me something that can (hopefully) change the resolution metadata hundreds of times more quickly. That's important, because I have a large number of very large images to be modified.
s/KAM
----- Original Message -----
From: "Jon Winters"
To: "Kevin Myers"
Cc: "gimp users"
Sent: Thursday, January 09, 2003 4:02 PM
Subject: Re: [Gimp-user] TIFF File Resolution Change
I think I found it over on the ImageMagick user list...
Try this:
mogrify -density 96 foo.tiff
Instead of 96 use whatever you want the resolution to be.
Good luck!
-- Jon Winters O O O O O O O "History Will Prove us right" http://www.obscurasite.com/jon/ / \ / \ / \ / \ / \ / \ / \
TIFF File Resolution Change
At 04:40 PM 1/9/2003 -0600, Kevin Myers wrote:
At the moment I'm considering modifying tiffset (a simple utility supplied with libtiff) to give me something that can (hopefully) change the resolution metadata hundreds of times more quickly. That's important, because I have a large number of very large images to be modified.
I'm sure it can be done very quickly by reading the Tags in the tiff and simply modifying the XResolution and YResolution tags. You can get the TIFF specification at www.wotsit.org. I've got some VB code that reads the Width and Height tags, and i'm sure it can be easily modified to also read (and modify) the resolution tags. E-mail me if you want it.
-Tim