Inkscape PNG with transparent BG too big in RapidWeaver

Using Inkscape with other software? Talk about it here.
Katedu
Posts: 3
Joined: Mon Jun 21, 2010 4:40 am

Inkscape PNG with transparent BG too big in RapidWeaver

Postby Katedu » Mon Jun 21, 2010 5:05 am

What information could be in an Inkscape-generated PNG with transparency that makes it display four times too large in RapidWeaver (a website design application)? The PNG displays normal size in Preview, Graphic Converter, and Safari. If I make a PNG without transparency in Inkscape, it displays normal size in RapidWeaver. I am not having problems with making the transparency work, it's just that the PNG displays too large (and then you can see all the ragged edges too).

If I make a GIF from that PNG with transparency and put that in RapidWeaver, it displays the right size (but looks terrible because of the edges). If I export the PNG without transparency and then make the background color transparent in Graphic Converter and put it into RapidWeaver, it displays the right size (but looks terrible because of the edges -- and isn't even the right colors for some reason). That's the extent of the tests I have thought of so far. Oh, wait, I did try making the Inkscape PNG transparent two different ways, first using the default no background and then setting a background color with an opacity of zero. Same bad result both ways.

I have tried posting on the RapidWeaver forum but haven't gotten an answer so far. It seems like using Inkscape is fairly common, so I'm surprised I have encountered this strange issue and am not seeing any other report of it. (Something is going cuckoo, and it could be me soon, if I don't figure this out.)

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Inkscape PNG with transparent BG too big in RapidWeaver

Postby brynn » Mon Jun 21, 2010 6:28 am

Welcome to InkscapeForum!
This may be some sort of bug, but I don't know enough about it to help. I just wanted to say Welcome, and also suggest that you double check your settings in the Export Bitmap dialog (page, selection, etc. and dimensions). After you've done that, the stage is set for those who know about bugs to help you ;)

Katedu
Posts: 3
Joined: Mon Jun 21, 2010 4:40 am

Re: Inkscape PNG with transparent BG too big in RapidWeaver

Postby Katedu » Mon Jun 21, 2010 7:01 am

Thanks for the welcome. I'm glad to have discovered Inkscape. I find it quite intuitive most of the time, and when I don't I am usually able to find help somewhere on the web.

I checked my export settings. The dimensions are 150 x 400 pixels (at 15 dpi, since I originally made it a pretty big size sort of randomly -- is that the problem??? I thought one could produce any size graphic from an SVG file.). I set it for Page, but Drawing works about the same, since my drawing is about the same size as the Page, just overlapping slightly if I put in a background. The PNG looks the size I want, except in RapidWeaver, where it displays four times too big. Weird!

- Kate

Editing after thinking more about this and looking at the sizes. Here's what I figured out:

The size that Rapidweaver displays my PNG at looks like 80% of the original size I constructed the SVG in Inkscape. Inkscape dpi is 90, and web is 72, so essentially Rapidweaver is reading some information in the PNG that tells it what size the original SVG is. So what is Rapidweaver reading that Preview etc don't read? Why does it only happen with Inkscape PNGs with transparency? How do I get rid of it?!!!

- Kate

User avatar
tomh
Posts: 218
Joined: Sat Feb 14, 2009 10:14 pm

Re: Inkscape PNG with transparent BG too big in RapidWeaver

Postby tomh » Mon Jun 21, 2010 11:53 pm

Thinking off the top of my head...

The transparnt/nontransparent png issue. Do you use these two diffrent routes for making png's in Inksape?
Inkscpe png's with transparancy, eg File-> Export Bitmap
without transparancy File->Save as->Caro png
If so,then that would explain the difence in the produced pngs.

Looking at two files created using both methods in a metadata reader (eg ExifTool). I can see that the export bitmap one specifies more metadata than the cairo one.

Eg. Both Images have this metadata stored:
Image width
Image height
Bit depth (8 bit)
colour type (RGB with alpha)
Compression
Filter
Interlace

The Cairo PNG also has:
Background colour <- here be the reason it isn't transparrent!

The Export bitmap one also has:
PixelsPerUnitX <-Here be the reason why Rapidweaver can determin the original dpi
pixels per unit Y
pixel Unit
Software (http://www.inkscape.org)

Have a look here: http://stackoverflow.com/questions/1386 ... g-metadata for some metadata stippers. You may also be able to remove the unwanted metadata using image editing software.

Katedu
Posts: 3
Joined: Mon Jun 21, 2010 4:40 am

Re: Inkscape PNG with transparent BG too big in RapidWeaver

Postby Katedu » Wed Jun 23, 2010 3:31 am

Thanks, I haven't ever used the Cairo option. But it was the metadata that was causing the problem. I got this response from the RapidWeaver folks:

"After some investigation this appears to be an issue with RapidWeaver not normalising the DPi of images placed in the 'Site Setup -> Logo' drop-well (they normailise as expected when dragged into a styled text area). I shall file this with our developer for looking into in a future update to RapidWeaver. In the meantime I would suggest ensuring that all images that you drag into the 'Site Setup -> Logo' drop-well have been optimised for web at 72dpi in your preferred image editing software. They should then display as expected."

Sure enough, I used Graphic Converter to save the PNG "for web" and now it behaves in RapidWeaver! I can see how saving for web is a good habit to get into when working with web graphics. Graphic Converter offers a number of choices for what to leave in and what to take out, which is nice.

Whew!


Return to “Inkscape & other”