View Issue Details

IDProjectCategoryView StatusLast Update
0012525ScribusGraphics / Image Framespublic2018-04-30 13:36
ReporterKunda Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
PlatformMacOSOSXOS Version10.8.5
Product Version1.5.0svn 
Summary0012525: GraphicsMagick won't export SLA because of SVG, "Failed to load an image mask"
DescriptionWhen trying to export to PDF that has a specific SVG in it, I get the error 'Failed to load an image mask'
The 'Collect for output' compressed directory is attached along with a screenshot of the error
Steps To Reproduce1) Open a New SLA
2) Create an Image frame
3) Import easterlillies-frame(publicdomainvectors).svg
4) Try to export to PDF

or
1) unzip attached compressed archive
2) open SLA
3) Try to export to PDF
Additional Information1.5svn r19342
TagsGraphicsMagick, upstream
Attached Files
image-mask-svg-issue.zip (81,698 bytes)
PatchNo

Relationships

related to 0011994 closedcbradney The GraphicsMagick plug-in doesn't recognise all supported formats, even though they can be imported 
child of 0002931 acknowledged Metabug: SVG 

Activities

Kunda

2014-07-16 16:25

updater   ~0032782

Last edited: 2015-12-13 14:40

From MrB on IRC:

>MrB:
else
{
bool gotAlpha = false;
bool pdfVer14 = (Options.Version >= PDFOptions::PDFVersion_14) || (Options.Version == PDFOptions::PDFVersion_X4);
gotAlpha = img2.getAlpha(fn, c->pixm.imgInfo.actualPageNumber, im2, true, pdfVer14, afl, img.width(), img.height());
if (!gotAlpha)
{
PDF_Error_MaskLoadFailure(fn);
return false;
}
alphaM = !im2.isEmpty();
}

>Kunda: I'll take a stab at it: so it's failing because it doesn't(?) have an alpha layer and it's trying to be exported in the wrong pdf format version?
>MrB: yeah i guess so.. but i wonder why thats a requirement. a valid svg could also just be a solid rectangle

FirasH

2014-07-16 16:32

reporter   ~0032784

Same here with 1.5.0.svn (19347) on openSUSE.

JLuc

2014-07-24 22:06

developer   ~0032969

I confirm the issue on ubuntu.

Strange is that the preflight checker does issue a warning : "item has got some transparency" !!! (translated from french).

scribus knows it has a transparency in the preflight checker
but lands in that (!gotAlpha) part a few seconds later when creating the PDF...

I also had a crash a few seconds later the first time i tried, but cannot reproduce the crash.

JLuc

2014-07-24 22:14

developer   ~0032970

PS : following cited code excerpt if condition, i did test with export to PDF version 1.4

Kunda

2014-07-24 23:10

updater   ~0032973

jghali says he can't reproduce it on windows (not sure what win version he is using)

Kunda

2014-07-26 13:05

updater   ~0033022

The non-ideal workaround was changing the SVG in to a PNG :(
The issue still remains except on windows per jghali)

jghali

2014-07-26 16:00

administrator   ~0033030

I've compiled latest trunk version in an OpenSuse 13.1 VM and... I cannot reproduce the issue either...

jghali

2014-07-26 17:59

administrator   ~0033031

Same in Ubuntu 14.04, I cannot reproduce the issue.

jghali

2014-07-26 18:10

administrator   ~0033032

I wonder if the use of GraphicksMagick may be involved in this issue...

Kunda

2014-07-27 06:27

updater   ~0033039

Good thinking. I will figure out how to tweak the build formula to not build with GraphicksMagick and report back soon

Kunda

2014-08-02 17:50

updater   ~0033154

jghali, Confirmed this is a GraphicsMagick issue. I compiled r19395 without GM support (v1.3.19) and was able to export the SVG to pdf. How do we proceed ?

Kunda

2015-12-13 14:48

updater   ~0037914

Last edited: 2015-12-13 14:49

Can still reproduce on
OSX 10.10.5 1.5.1svn r20620
Graphicsmagick 1.3.23

CLI output:
embed list: ""
subset list: ""
outline list: ""
Failed to read image "/Users/blah/Downloads/FFbrowser/image-mask-svg-issue/images/easterlillies-frame(publicdomainvectors).svg"


Kunda

2015-12-16 13:19

updater   ~0037926

How do i simulate this in GM without Scribus?

Kunda

2016-01-21 13:06

updater   ~0038319

Last edited: 2016-01-21 13:19

Running in graphicsmagick
Test:~ blah$ gm identify /Users/blah/Downloads/image-mask-svg-issue/images/easterlillies-frame\(publicdomainvectors\).svg
gm identify: Request did not return an image.


Note: I can successfully run 'gm convert' and convert the .svg to a .pdf with no problem. Example:
Test:~ blah$ gm convert /Users/blah/Downloads/image-mask-svg-issue/images/easterlillies-frame-publicdomainvectors.svg test.pdf


Running in imagemagick
Test:~ blah$ identify /Users/blah/Downloads/image-mask-svg-issue/images/easterlillies-frame\(publicdomainvectors\).svg
sh: line 1: 23898 Trace/BPT trap: 5       "inkscape" "/var/tmp/magick-23896OgCaXiEAwfeo" --export-png="/var/tmp/magick-23896AwjhfrNrJPRE" --export-dpi="90_90" --export-background="rgb(100%_100%_100%)" --export-background-opacity="1" > "/var/tmp/magick-23896agkS6WzO9o4g" 2>&1
/Users/sphenoid/Downloads/image-mask-svg-issue/images/easterlillies-frame(publicdomainvectors).svg SVG 1003x1165 1003x1165+0+0 16-bit sRGB 187KB 0.000u 0:00.000


urzds

2017-03-16 09:43

reporter   ~0043611

I ran into the same issue with imagemagick 8:6.8.9.9-7ubuntu5.6 (Ubuntu 16.04 / KDE neon).

urzds

2017-03-16 10:38

reporter   ~0043612

The same issue occurs, if I additionally install graphicsmagick 1.3.23-1build1. I am using scribus-ng 1.5.2-0ubuntu16.04.0~ppa0.

GraphicsMagick's `gm identify` fails for all SVG images used in my SLA file with "Request did not return an image.". ImageMagick's `identify` succeeds for all SVG images, telling me reasonable dimensions for them.

Please note that I chose to embed all images into the SLA.

urzds

2017-03-16 10:41

reporter   ~0043613

scribus-trunk 1.5.3svn~r21826~20170315~ppa66~ubuntu16.04.1 does not show this issue.

Issue History

Date Modified Username Field Change
2014-07-15 03:58 Kunda New Issue
2014-07-15 03:58 Kunda File Added: image-mask-svg-issue.zip
2014-07-15 03:58 Kunda File Added: Failed_to_load_an_image_mask.png
2014-07-15 03:59 Kunda Project Infrastructure => Scribus
2014-07-15 04:00 Kunda Category General => Graphics / Image Frames
2014-07-15 04:00 Kunda Relationship added child of 0002931
2014-07-16 16:25 Kunda Note Added: 0032782
2014-07-16 16:27 Kunda Note Edited: 0032782
2014-07-16 16:32 FirasH Note Added: 0032784
2014-07-16 16:32 FirasH Status new => confirmed
2014-07-24 22:06 JLuc Note Added: 0032969
2014-07-24 22:14 JLuc Note Added: 0032970
2014-07-24 23:10 Kunda Note Added: 0032973
2014-07-26 13:05 Kunda Note Added: 0033022
2014-07-26 14:41 Kunda Priority high => normal
2014-07-26 16:00 jghali Note Added: 0033030
2014-07-26 17:59 jghali Note Added: 0033031
2014-07-26 18:10 jghali Note Added: 0033032
2014-07-27 06:27 Kunda Note Added: 0033039
2014-08-02 17:50 Kunda Note Added: 0033154
2014-08-08 20:17 Kunda Relationship added related to 0011994
2014-08-21 11:47 Kunda Summary Error when trying to export SLA with SVG in it: Failed to load an image mask => GraphicsMagick won't export SLA because of SVG, "Failed to load an image mask"
2015-02-24 23:38 Kunda Patch => No
2015-02-24 23:38 Kunda Product Version => 1.5.0svn
2015-02-24 23:38 Kunda Target Version => 1.5.1svn
2015-03-02 23:08 Kunda Target Version 1.5.1svn => 1.5.1
2015-09-17 20:10 Kunda Category Graphics / Image Frames => Graphics/Img Frames
2015-09-17 20:11 Kunda Category Graphics/Img Frames => Graphics / Image Frames
2015-12-13 14:40 Kunda Note Edited: 0032782
2015-12-13 14:48 Kunda Note Added: 0037914
2015-12-13 14:49 Kunda Note Edited: 0037914
2015-12-16 13:19 Kunda Note Added: 0037926
2016-01-21 13:06 Kunda Note Added: 0038319
2016-01-21 13:07 Kunda Note Edited: 0038319
2016-01-21 13:19 Kunda Note Edited: 0038319
2016-01-23 17:16 cbradney Target Version 1.5.1 => 1.5.3
2016-04-20 15:05 Kunda Tag Attached: upstream
2016-04-20 15:06 Kunda Tag Attached: GraphicsMagick
2016-12-08 22:04 Kunda Target Version 1.5.3 => 1.5.4
2017-03-16 09:43 urzds Note Added: 0043611
2017-03-16 10:38 urzds Note Added: 0043612
2017-03-16 10:41 urzds Note Added: 0043613
2018-04-30 13:36 jghali Target Version 1.5.4 =>