View Issue Details

IDProjectCategoryView StatusLast Update
0014842ScribusGraphics / Image Framespublic2021-09-17 20:38
Reporterdavidrevoy Assigned Tojghali  
PrioritynormalSeveritymajorReproducibilityalways
Status assignedResolutionopen 
Product Version1.5.3 
Summary0014842: Darken edge around non-transparent pixels in transparent PNG
DescriptionWhen importing a transparent PNG inside an image frame, a darken edge appear around the non-transparent pixels.
Steps To Reproduce1. Create a white shape on a PNG over a transparent background ( imagemagick, Inkscape, Gimp or Krita tested ).
2. Import the PNG picture on your Scribus project.
3. A dark edge appears around it. This dark edge continue on export ( PDF, Image, or all other methods ).
Additional InformationI attach to this bug report a ZIP with inside:
- a PNG
- a SLA
to reproduce the bug easily.
A screenshot is also on the archive to share what I see on my screen.

( Note: this bug is a blocker for the Pepper&Carrot book project as it produce a dark edge around the speech-bubbles, repository here : https://github.com/Deevad/peppercarrot_print_book01 )
TagsNo tags attached.
PatchNo

Relationships

has duplicate 0016632 closedjghali distorted colors on images with transparency 

Activities

davidrevoy

2017-06-02 16:42

reporter  

ale

2017-06-03 11:13

manager   ~0043986

confirmed in 1.5.x and 1.4.x

jghali

2017-06-03 20:43

administrator   ~0043988

Last edited: 2017-06-03 21:02

I've had a look at this issue. I did tests with Indesign: if Indesign does not show the darken edges when importing the image, after export the resulting PDF *does show them*. So I suspect the origin of the problem comes from something in the PNG or from the PDF transparency model. In both case, we cannot do much to fix those.

I've also noticed that the transparent areas in the PNG are composed of a black background, Indesign shows it when previewing the image. Might explain part of the issue. In the PDF transparency model, computations involves a foreground color and a background color, and things can obviously change if one of those is black instead of white. Would be interesting to modify the PNG to use in those transparent areas a transparent white instead of a transparent black.

davidrevoy

2017-06-03 21:28

reporter   ~0043990

Thank you @ale and @jghali.

I also made test to ensure the background was (transparent) white, but the result is still the same.

$ convert ghost.png -background white -define png:color-type=6 -format PNG32 -colorspace sRGB ghost-white.png

davidrevoy

2017-06-07 12:30

reporter   ~0044007

[4 days after]
Solved! https://www.peppercarrot.com/extras/forum/2017-06-07_scribus-transparency-PNG-solved.png

The correct Imagemagick syntax:
$ convert ghost.png -background White -alpha Background ghost-white.png

Note: Still an "acceptable bug" the preview of Scribus ( Normal/Low mode ) destroy white-transparency and replace them with black-transparency creating again black borders on PNG transparency : https://www.peppercarrot.com/extras/forum/2017-06-07_transparency-preview-mode_in-Scribus.gif . Also, I was mislead in this thread by a bug in Krita showing wrong "Background Color" https://www.peppercarrot.com/extras/forum/2017-06-07_scribus-transparency-PNG-in-Krita.png .

I hope this bug-report will help user in same situation.

Sources of my information:
- Imagemagick forum http://www.imagemagick.org/discourse-server/viewtopic.php?t=28214
- this thread about Indesign and PNG https://graphicdesign.stackexchange.com/questions/51756/why-do-some-but-not-all-png-files-with-transparency-in-indesign-documents-ha

Issue History

Date Modified Username Field Change
2017-06-02 16:42 davidrevoy New Issue
2017-06-02 16:42 davidrevoy File Added: 2017-06-02_scribus_transparency-bug_example.zip
2017-06-02 21:08 cbradney Assigned To => jghali
2017-06-02 21:08 cbradney Status new => assigned
2017-06-02 21:27 jghali Summary [appimage 1.5.3] => Darken edge around non-transparent pixels in transparent PNG
2017-06-03 11:13 ale Note Added: 0043986
2017-06-03 20:43 jghali Note Added: 0043988
2017-06-03 21:02 jghali Priority high => normal
2017-06-03 21:02 jghali Note Edited: 0043988
2017-06-03 21:28 davidrevoy Note Added: 0043990
2017-06-07 12:30 davidrevoy Note Added: 0044007
2021-09-17 20:38 jghali Relationship added has duplicate 0016632