dear all, I have a inkscape problem that I do not understand. An object showing a discrete color scale is converted to a continuous scale in the eps export. here is the example file http://www.climate.unibe.ch/~muthers/exchange/drawing.svg this is the exported file http://www.climate.unibe.ch/~muthers/exchange/drawing.eps any help is appreciated! inkscape version is 0.48.4 on arch linux. cheers, stefan
on 2013-04-29 21:21
on 2013-04-29 21:55
I don't know much about bitmaps, so you may get a better answer from someone else, however here are a few comments. The problem appears to be related to the fact that this was originally an embedded png image. The size of the image was 1 pixel by 1 pixel. This is shown in the svg tag <image width="1" height="1" transform="matrix(1,0,0,-1,0,1)" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAABCAYAAADuHp8EAAAABHNCSVQICAgIfAhkiAAAAERJREFUCJkBOQDG/wG2aij/FxsXABQgJQAUKCAAABMaAAoVHAAACkUAAAAAAM4AzgDM8eUAus3tABvtKQCXxugA/cioAGJcEJMX3vuCAAAAAElFTkSuQmCC" id="image20862" /> Then the image was expanded by a factor of 465 horizontally and 25 vertically. This is shown in the element transform="matrix(465.32309,0,0,25.338759,163.05532,330.72791)" During this expansion, Inkscape chose to interpret the color gradations in a discrete way as 14 separate colors, while the postscript file apparently interpreted these as a continuous color scale. I think the Inkscape interpretation is probably the correct one; however, the way to avoid this in the future would be to import a full size png image that does not need to be scaled. cheers, Alvin Penner -- View this message in context: http://inkscape.13.x6.nabble.com/discrete-color-sc... Sent from the Inkscape - User mailing list archive at Nabble.com.
on 2013-04-29 23:02
hi Alvin, thank you for your comprehensive explanation! The color scale stems from a PDF file produced with ncl: http://www.climate.unibe.ch/~muthers/exchange/nclplot.pdf I tried several PDF viewers, in any case the color scale was displayed in the correct way. Therefore I would expect the same after importing (File->Import) and exporting it (to eps or pdf) using inkscape. It this maybe a inkscape bug? As a workaround I found that I can export the color scale as bitmap and then re-import it into inkscape. After this, the exported eps looks the way I expect it to be. cheers, stefan  http://www.ncl.ucar.edu/
on 2013-04-30 01:15
yes, it looks as if this is probably an Inkscape bug. I loaded the file nclplot.pdf into Inkscape and got the same result as you got, namely an image of size 1 pixel by 1 pixel. Then, just for curiosity, I used Ghostscript to do a direct conversion from .pdf to .ps without using Inkscape at all. The command I used was: pdf2ps nclplot.pdf ncltest.ps This gave me the attached .ps file, which appears to be identical to the original pdf file. ncltest.ps <http://inkscape.13.x6.nabble.com/file/n4966775/ncl... So it is likely that the conversion error was caused by scaling performed by Inkscape. Alvin -- View this message in context: http://inkscape.13.x6.nabble.com/discrete-color-sc... Sent from the Inkscape - User mailing list archive at Nabble.com.
on 2013-04-30 11:27
On Mon, Apr 29, 2013 at 04:14:17PM -0700, alvinpenner wrote: > yes, it looks as if this is probably an Inkscape bug. I reported this as a bug, lets see what happens. https://bugs.launchpad.net/bugs/1174651 cheers and thanks again, stefan