Feature request: DPI value of imported graphic shouldn't be ignored
While doing some graphic design for printing I'm often obliged exchanging pixmap and vector graphics between GIMP, Inkscape and Scribus. Inkscape discards DPI of GIMP exported graphics, which is really unintuitive. Drawings that GIMP displays exactly how they were saved previously (I'm referring to format here -- A3, A4, B5 etc.) Inkscape opens at wrong DPI thus they're a few times bigger. Not a big deal when the whole page is exported from gimp (just scale picture at format's dimensions) , but makes things complicated if many smaller components are imported to be assembled in Inkscape. I must write down every single component's width or height and scale it proportionally. Really time consuming...
Vlada
Yeah, that'd be cool. Unfortunately it isn't straight forward to get it working. Currently we use GDK Pixbuff as the image loader, and it doesn't have that information in it. So, we'd need to use something like libpng directly to get the information out. Not impossible, but not trivial either.
I'm not sure on your experience, but if you'd like to work on this, I'd be happy to provide pointers.
--Ted
On Fri, 3 Nov 2006, Vladimir Savic wrote:
While doing some graphic design for printing I'm often obliged exchanging pixmap and vector graphics between GIMP, Inkscape and Scribus. Inkscape discards DPI of GIMP exported graphics, which is really unintuitive. Drawings that GIMP displays exactly how they were saved previously (I'm referring to format here -- A3, A4, B5 etc.) Inkscape opens at wrong DPI thus they're a few times bigger. Not a big deal when the whole page is exported from gimp (just scale picture at format's dimensions) , but makes things complicated if many smaller components are imported to be assembled in Inkscape. I must write down every single component's width or height and scale it proportionally. Really time consuming...
Vlada
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&da... _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
I'm open for any kind of ugly hack. :) Maybe another option in preferences. Something like "assumed DPI for imported graphic:" and then doing some calculation for DPI compensation. I don't know. Not many people will want anything different that 72, 75, 150, 300 and 600 dpi for their job.
I'm just a designer, but I do realize that libpng wont resolve exactly the same problem with tiffs, for example. It would be nice to have all graphic file formats supported, though.
And, unfortunately, it's too late for me to start coding at age 25. :) Maybe one day... When I become rich and famous... And gain much more free time. :) Just kidding...
Vlada
On Friday 03 November 2006 19:12, Ted Gould wrote:
Yeah, that'd be cool. Unfortunately it isn't straight forward to get it working. Currently we use GDK Pixbuff as the image loader, and it doesn't have that information in it. So, we'd need to use something like libpng directly to get the information out. Not impossible, but not trivial either.
I'm not sure on your experience, but if you'd like to work on this, I'd be happy to provide pointers.
--Ted
On Fri, 3 Nov 2006, Vladimir Savic wrote:
While doing some graphic design for printing I'm often obliged exchanging pixmap and vector graphics between GIMP, Inkscape and Scribus. Inkscape discards DPI of GIMP exported graphics, which is really unintuitive. Drawings that GIMP displays exactly how they were saved previously (I'm referring to format here -- A3, A4, B5 etc.) Inkscape opens at wrong DPI thus they're a few times bigger. Not a big deal when the whole page is exported from gimp (just scale picture at format's dimensions) , but makes things complicated if many smaller components are imported to be assembled in Inkscape. I must write down every single component's width or height and scale it proportionally. Really time consuming...
Vlada
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&da... _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&da... _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On Friday, November 3, 2006, at 02:24 PM, Vladimir Savic wrote:
I'm open for any kind of ugly hack. :) Maybe another option in preferences. Something like "assumed DPI for imported graphic:" and then doing some calculation for DPI compensation. I don't know. Not many people will want anything different that 72, 75, 150, 300 and 600 dpi for their job.
I'm just a designer, but I do realize that libpng wont resolve exactly the same problem with tiffs, for example. It would be nice to have all graphic file formats supported, though.
Actually... I had one solution in earlier where we feed things to libpng and the pixbuff loader at the same time. I could get the DPI, but could only set it for certain builds of GTK+.
A more robust solution requires us to track some image metadata. However, this same tracking is probably what we'd need for detecting changes to open files (or at least could be done to leverage common code), so it might be useful for a few things.
Check the RFE and bug trackers for DPI issues (I think they're assigned to me, BTW) and see if you can add comments to existing ones or need to open new ones. An RFE for "assumed import DPI" might actually be quite useful and would take far less coding than the more robust solutions.
On Saturday 04 November 2006 03:49, Jon Cruz wrote:
On Friday, November 3, 2006, at 02:24 PM, Vladimir Savic wrote:
I'm open for any kind of ugly hack. :) Maybe another option in preferences. Something like "assumed DPI for imported graphic:" and then doing some calculation for DPI compensation. I don't know. Not many people will want anything different that 72, 75, 150, 300 and 600 dpi for their job.
I'm just a designer, but I do realize that libpng wont resolve exactly the same problem with tiffs, for example. It would be nice to have all graphic file formats supported, though.
Actually... I had one solution in earlier where we feed things to libpng and the pixbuff loader at the same time. I could get the DPI, but could only set it for certain builds of GTK+.
That is not so bad solution if "certain builds of GTK+" means newer than 2.x.x. If I can remember correctly there was same talking about supporting only new version of GTK+ with new Inkscape 0.45. But I cann't say the name of that mail thread.
A more robust solution requires us to track some image metadata. However, this same tracking is probably what we'd need for detecting changes to open files (or at least could be done to leverage common code), so it might be useful for a few things.
Check the RFE and bug trackers for DPI issues (I think they're assigned to me, BTW) and see if you can add comments to existing ones or need to open new ones. An RFE for "assumed import DPI" might actually be quite useful and would take far less coding than the more robust solutions.
Checked. I've found two requests: [ 1574853 ] manage dpi in document preferences [ 1457167 ] Scale Bitmap to DPI
I'll open another one anyway. Done! I've tried to cover all issues of that upper two in one request. Take a look.
[ 1590486 ] Assumed/specified import DPI
What I don't know is if there will be pixel losing if bitmap exported at 300 dpi from gimp is imported into Inkscape and then re-exported at 300 dpi again?
Vlada
On Saturday, November 4, 2006, at 07:54 AM, Vladimir Savic wrote:
That is not so bad solution if "certain builds of GTK+" means newer than 2.x.x. If I can remember correctly there was same talking about supporting only new version of GTK+ with new Inkscape 0.45. But I cann't say the name of that mail thread.
No. It means only on some distros that have enabled certain developer flags.
:-(
I'll open another one anyway. Done! I've tried to cover all issues of that upper two in one request. Take a look.
[ 1590486 ] Assumed/specified import DPI
What I don't know is if there will be pixel losing if bitmap exported at 300 dpi from gimp is imported into Inkscape and then re-exported at 300 dpi again?
That might depend slightly on our render engine details and what all you have involved. However in theory it should come across fine. Inkscape doesn't really mangle the bitmaps, instead it just leaves the source pixels as-is and just presents them scaled to the area needed for the current presentation. All the bits stay intact, unlike manipulation in most bitmap/raster programs.
On Saturday 04 November 2006 16:25, Jon Cruz wrote:
On Saturday, November 4, 2006, at 07:54 AM, Vladimir Savic wrote:
That is not so bad solution if "certain builds of GTK+" means newer than 2.x.x. If I can remember correctly there was same talking about supporting only new version of GTK+ with new Inkscape 0.45. But I cann't say the name of that mail thread.
No. It means only on some distros that have enabled certain developer flags.
:-(
Pity! :(
Inkscape doesn't really mangle the bitmaps, instead it just leaves the source pixels as-is and just presents them scaled to the area needed for the current presentation. All the bits stay intact, unlike manipulation in most bitmap/raster programs.
Great. Volunteering to do the test (comparing gimp and inkscape output) as soon as I see this feature working. Hope that that will happen soon....
Cheers, Vlada
participants (3)
-
Jon Cruz
-
Ted Gould
-
Vladimir Savic