Exported PNGs with shadow cut off

Asked by windowsnt

I am a new user to inkscape. Before I begin, I would like to congratulate the Inkscape developement team for such an amazing product. I am impressed. I am using Inkscape version 0.46 on Windows XP. I just have one little issue regarding exported PNGs. If I export a graphic with a straight edge, the result is fine. However, when I export a graphic with a shadow, the result is a cut off PNG file, squared off on 4 sides. The shadow is a blurred dupilcate sent to the very back of the image.

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
su_v
Solved:
Last query:
Last reply:
Revision history for this message
Oleg Koptev (koptev-oleg) said :
#1

hello again Waterburn :)

as you could see all objects inscribed in rectangular borders, so, when you export drawing, result will be in rectangular in any case.
but is it a problem? I suppose all grafical applications work similar. I never saw for example circular png..
if your background is transparent - i don't see any problem.

cheerz, Oleg

Revision history for this message
su_v (suv-lp) said :
#2

I think this is a bug in Inkscape 0.46 with masks, filters and translated (moved) objects/groups that will be fixed in version 0.47:

e.g. bug #208217 “Masks don't work on print or PDF”: <https://bugs.launchpad.net/inkscape/+bug/208217> and many others I haven't bothered to search for (but can do if needed ;-).

@Waterburn - can you upload your image and the original svg file somewhere? Or describe in detail how you
create that shadow on what kind of object, did you group or move it before/after adding the shadow? What export settings did you use?

Or better yet - could you try a recent prerelease build from <http://sourceforge.net/projects/inkscape/files/> to see if the issue still persists…?

Revision history for this message
windowsnt (windowsnt) said :
#3

Hi all,

The problem is, the exported image is supposed to be in the irregular shape of the image, but instead it is in the shape of a square, forcing edges to be cut off. And, it could possibly be the bug ~suv is refering to because the image WAS grouped after adding the shadow, however, it was ungrouped later and the problem still remains.

The SVG File download here: http://www.4shared.com/file/123554074/ef3072f9/folder.html.

The PNG file download here: http://www.4shared.com/file/123554082/81cbcb03/folder.html
Please ignore the preview for this on the page, download it to see the actual image.

Thank you.

Waterburn

Revision history for this message
Oleg Koptev (koptev-oleg) said :
#4

yeah, it looks like bug.
0.47 - export selection - looks fine. http://smages.com/i/77/d9/77d9aa7573ada4010709be0915343191.png
or maybe you forgot to select shadow? sorry, i didn't understand your question clearly at first time.

cheerz

Revision history for this message
drw123 (drwaters) said :
#5

@Waterburn... Place the objects on a white background that is a little larger then the object. Group and export. You can also
convert to *.jpg after exporting. This is not a bug in Inkscape, when it gets the option to export as JPG the problem will go away :-)
There is also some help here.
http://www.flickr.com/groups/screencasters/discuss/72157607274508834/

Revision history for this message
drw123 (drwaters) said :
#6
Revision history for this message
windowsnt (windowsnt) said :
#7

You mean I would have to follow these procedures everytime I export with a shadow? Shouldn't inkscape be able to export it? Could it be issues with the image viewer? If this looks like a bug, what is the status of it?

Revision history for this message
su_v (suv-lp) said :
#8

@drw123 - your method certainly is a workaround - but it's still a bug if Inkscape miscalculates the visual bounding box of blurred objects, exporting or not. You can test it when selecting all elements of 'folder.svg' - 0.46 omits the shadow whereas 0.47pre includes it in the visual bounding box.

@Waterburn - as Oleg already said - it's fixed in 0.47pre builds. If you can't install a prerelease version, use drw123's workaround. Re bug status - I can try to find the relevant bug report tomorrow, or you try yourself (<https://bugs.launchpad.net/inkscape/+bugs?advanced=1> ;-) - I think it's not the one I mentioned above.

hth, ~suv

Revision history for this message
Best su_v (suv-lp) said :
#9

Bug #204820 in Inkscape: “clipping when exporting bitmap”:
<https://bugs.launchpad.net/inkscape/+bug/204820>

Bug #209832 in Inkscape: “exporting objects with blur makes them cut”:
<https://bugs.launchpad.net/inkscape/+bug/209832>

Bug #317846 in Inkscape: “Export selection or drawing to bitmap, cuts of any blurred/feathered objects.”:
<https://bugs.launchpad.net/inkscape/+bug/317846>

all marked fixed for SVN and 0.47 ;-)

Revision history for this message
windowsnt (windowsnt) said :
#10

Beautiful, Thank you very much for spending time on my problem. (that includes everyone here) I now know a work around for 0.46 and that the bug is fixed in 0.47pre.

Revision history for this message
windowsnt (windowsnt) said :
#11

Thanks ~suv, that solved my question.

Revision history for this message
drw123 (drwaters) said :
#12

@Waterburn, SVN.
0.47 does show the bounding box surrounding the blur, but if you export your "Folder SVG" from 0.46 or 0.47 after grouping and open in MS Paint you get the same black border and not the blur. The same thing happens on flickr. If it's a bug, it is still in 0.47 :-( I've done this in a side by side test of 0.46 and 0.47.
The pictures open OK in Corel PS Pro X1 and other higher end viewers that support what I believe is called Alpha Channels. I could be wrong on the terms, but the lower end viewers won't give good results. On Flickr the pictures will have the blur wrong unless you view in "all sizes".

Revision history for this message
Oleg Koptev (koptev-oleg) said :
#13

drw123 - it isn't bug. as you say - not all applications work with alphachannel. your workaround is solution for that cases. It is so called 'false transparency' method