If I change resolution of an image with gimp-image-set-resolution, that seems to have no effect on x/y/h/w arguments used in other gimp-* commands. E.g. if I increase resoklution form 72, 72 to 720, 720,
(gimp-rect-select image-id 0 0 720 720....)
Selects a rectangle 10" x 10", not 1" by 1".
Is there any way to persuade gimp to higher resolution units in commands like gimp-rect-select, gimp-pencil, etc?
Thanks for any help.
Page 1 of 1
[script-fu] efect of gimp-image-set-resolution
#2
Posted 09 February 2010 - 02:11 PM
Changing the resolution doesn't change the pixel count! You have to scale the image to change the pixel count.
-Rob A>
-Rob A>
#3
Posted 10 February 2010 - 04:45 AM
Okay, need to be more specific about what I'm trying to do.
At simplest, say I want to draw a line 10mm long, drawing to be printed out on a printer capable of 600 dpi.
I want the line to be _exactly_ 10 mm, as close as possible at 600 dpi.
But gimp_pencil only knows about pixels, so I convert 72 pixel/inch (or whatever get_resolution tels me) / 25.4 to convert to pixels per mm
= 2.84. That makes 28.4 pixels for 10 mm. It's that .4 pixel that bothers me. If I round, floor, or ceiling, my line length is off by 10% or so.
Won't show on screen, but will matter on paper.
I tried making my drawing 10x required size and scaling down by factor of ten; I just end up with mush at line ends (interpolation at work, I suppose).
Any way round? Or just no way to be that accurate in GIMP?
Thanks
Alan
At simplest, say I want to draw a line 10mm long, drawing to be printed out on a printer capable of 600 dpi.
I want the line to be _exactly_ 10 mm, as close as possible at 600 dpi.
But gimp_pencil only knows about pixels, so I convert 72 pixel/inch (or whatever get_resolution tels me) / 25.4 to convert to pixels per mm
= 2.84. That makes 28.4 pixels for 10 mm. It's that .4 pixel that bothers me. If I round, floor, or ceiling, my line length is off by 10% or so.
Won't show on screen, but will matter on paper.
I tried making my drawing 10x required size and scaling down by factor of ten; I just end up with mush at line ends (interpolation at work, I suppose).
Any way round? Or just no way to be that accurate in GIMP?
Thanks
Alan
#4
Posted 10 February 2010 - 05:27 AM
EntropyReduction said:
At simplest, say I want to draw a line 10mm long, drawing to be printed out on a printer capable of 600 dpi.
I want the line to be _exactly_ 10 mm, as close as possible at 600 dpi.
But gimp_pencil only knows about pixels, so I convert 72 pixel/inch (or whatever get_resolution tels me) / 25.4 to convert to pixels per mm = 2.84. That makes 28.4 pixels for 10 mm. It's that .4 pixel that bothers me. If I round, floor, or ceiling, my line length is off by 10% or so.
I want the line to be _exactly_ 10 mm, as close as possible at 600 dpi.
But gimp_pencil only knows about pixels, so I convert 72 pixel/inch (or whatever get_resolution tels me) / 25.4 to convert to pixels per mm = 2.84. That makes 28.4 pixels for 10 mm. It's that .4 pixel that bothers me. If I round, floor, or ceiling, my line length is off by 10% or so.
That should be 600 pixels/inch (your printer's resolution) divided by 25.4 == 23.6 pixels per mm. In other words, your script should draw a line 236 pixels long for the line to appear as 10 mm long on the printout (this results in an error of less than 0.22%).
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
#5
Posted 11 February 2010 - 04:57 PM
saulgoode said:
EntropyReduction said:
At simplest, say I want to draw a line 10mm long, drawing to be printed out on a printer capable of 600 dpi.
I want the line to be _exactly_ 10 mm, as close as possible at 600 dpi.
But gimp_pencil only knows about pixels, so I convert 72 pixel/inch (or whatever get_resolution tels me) / 25.4 to convert to pixels per mm = 2.84. That makes 28.4 pixels for 10 mm. It's that .4 pixel that bothers me. If I round, floor, or ceiling, my line length is off by 10% or so.
I want the line to be _exactly_ 10 mm, as close as possible at 600 dpi.
But gimp_pencil only knows about pixels, so I convert 72 pixel/inch (or whatever get_resolution tels me) / 25.4 to convert to pixels per mm = 2.84. That makes 28.4 pixels for 10 mm. It's that .4 pixel that bothers me. If I round, floor, or ceiling, my line length is off by 10% or so.
That should be 600 pixels/inch (your printer's resolution) divided by 25.4 == 23.6 pixels per mm. In other words, your script should draw a line 236 pixels long for the line to appear as 10 mm long on the printout (this results in an error of less than 0.22%).
If I try to draw a line 236 pixels long, I get a line on screen 236 pixels long (236/72 or 3.27 inches). That prints out a line 3.27" long, no matter what printer resolution is (windows, gimp 2.6.7). Surely that's the way it's meant to work?
Ah, just looked at print dialog. So I could make a line 236 pixels long, then adjust resolution on print... dialog image settings to tell it to print 600 pixels/inch...?
Doesn't seem to be a way to cause printing to happen at a specified resolution using a gimp-* command?
Alan
Share this topic:
Page 1 of 1

Help












