Quantcast

discrete color scale object becomes continuous in eps export

classic Classic list List threaded Threaded
5 messages Options
smu
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

discrete color scale object becomes continuous in eps export

smu
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

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: discrete color scale object becomes continuous in eps export

alvinpenner
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
smu
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: discrete color scale object becomes continuous in eps export

smu
hi Alvin,

thank you for your comprehensive explanation!

The color scale stems from a PDF file produced with ncl[1]:

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

[1] http://www.ncl.ucar.edu/


On Mon, Apr 29, 2013 at 12:54:03PM -0700, alvinpenner wrote:

> 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-scale-object-becomes-continuous-in-eps-export-tp4966766p4966768.html
> Sent from the Inkscape - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
> _______________________________________________
> Inkscape-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-user
>

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: discrete color scale object becomes continuous in eps export

alvinpenner
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
So it is likely that the conversion error was caused by scaling performed by Inkscape.

Alvin
smu
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: discrete color scale object becomes continuous in eps export

smu
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


------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Loading...