View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0010686 | Scribus | Import / Export | public | 2012-04-18 16:38 | 2012-05-25 17:20 |
Reporter | ale | Assigned To | jghali | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.5.0 | ||||
Fixed in Version | 1.4.1.svn | ||||
Summary | 0010686: [patch] html importer tries (and fails) to read embedded images | ||||
Description | if an image is embedded in an html file as <img style="height:2.5141cm;width:14.4889cm;" alt="" src="data:image/*;base64,iVBORw0KGgoAA...">, scribus will put the whole base64 encoded text into the text frame. for a jpg this will bring scribus to its knees and make the content of the frame unusable. the attached patch, will replace the content by the string "embedded image" | ||||
Tags | No tags attached. | ||||
Patch | |||||
|
discard_embedded_image.diff (551 bytes)
Index: htmlreader.cpp =================================================================== --- htmlreader.cpp (revision 17445) +++ htmlreader.cpp (working copy) @@ -218,7 +218,11 @@ { if (attrs.localName(i) == "src") { - imgline += " src: " + attrs.value(i); + if (attrs.value(i).indexOf("data:image") == -1) { + imgline += " src: " + attrs.value(i); + } else { + imgline += " src: embedded image"; + } } if (attrs.localName(i) == "alt") { |
|
This is the easy way out... why can't we write the image to disk and then load it? Also, re style and all those unnecessary braces.. + if (attrs.value(i).indexOf("data:image") == -1) { + imgline += " src: " + attrs.value(i); + } else { + imgline += " src: embedded image"; + } should be: + if (attrs.value(i).indexOf("data:image") == -1) + imgline += " src: " + attrs.value(i); + else + imgline += " src: embedded image"; |
|
the html importer does not recognize images when they are external... but yes, it would be possible to add the image to disk or to insert it as an embedded frame (probably better). |
|
if you estimate that this patch solves the issues without leading to other problems, could anybody commit it before the next ppa is generated? as you can read in the ML, antonio needs it for his work... thanks a.l.e |
|
Should this not go into 1.4.2 as well ? |
|
from the "finxed in version" message, it already should be in 1.4.1... |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-04-18 16:38 | ale | New Issue | |
2012-04-18 16:38 | ale | File Added: discard_embedded_image.diff | |
2012-04-18 17:24 | ale | Description Updated | |
2012-04-18 17:24 | ale | Description Updated | |
2012-04-18 18:39 | cbradney | Note Added: 0027956 | |
2012-04-18 19:45 | ale | Note Added: 0027958 | |
2012-04-19 11:11 | ale | Note Added: 0027960 | |
2012-04-19 20:55 | jghali | Status | new => resolved |
2012-04-19 20:55 | jghali | Fixed in Version | => 1.4.1.svn |
2012-04-19 20:55 | jghali | Resolution | open => fixed |
2012-04-19 20:55 | jghali | Assigned To | => jghali |
2012-04-29 10:52 | cbradney | Status | resolved => closed |
2012-05-25 17:00 |
|
Note Added: 0028035 | |
2012-05-25 17:20 | ale | Note Added: 0028036 |