Dear Jeremy,

Thanks! Just a follow-up... some software (e.g. pyFerret we use) uses 
overlapping pixels to avoid aliasing effects; surprisingly, it works. A 
requirement is that all pixels should be present (no holes). Nonetheless, one 
cannot use transparency here at all.

I do not believe that setting higher DPI will fix the colour problem though.
I do suspect that colour coding may not match, or there is a bug with 
transparency setting (e.g., 
https://github.com/OpenOrienteering/mapper/issues/482 ). Something similar is 
spotted in another Qt-based application (https://hub.qgis.org/issues/4641 )/. 
Indeed, it may be a ticked on Qt's PDF export.

All the best,
Serge


> -----Original Message-----
> From: Jeremy Sanders [mailto:[email protected]]
> Sent: 12 May 2016 19:16
> To: Gromov, Sergey <[email protected]>; Michael Clerx
> <[email protected]>; [email protected]
> Subject: Re: [Veusz-discuss] Image to pdf conversion
> 
> Hi all
> 
> Interesting - I've seen the smoothing in SVG. I don't think there's any way to
> switch it off in the file format. I don't think there are options to disable
> compression Qt's PDF export. I should file a bug report about the Pdf, as I 
> don't
> think it's the correct default behaviour (if anyone else has time please feel 
> free to
> do this).
> 
> As you suggest, using rectangles mostly works, though in practice, you get
> annoying light lines between the rectangles due to anti-aliasing in PDF 
> viewers,
> etc.
> 
> One solution is to resample the image to a higher resolution - this should 
> reduce
> the effect of the smoothing and the compression. In fact the default image
> widget will do this if the image x and y grid is not regular. The downside is 
> the
> extra space used in the output file.
> 
> So Michael, you could try making the 2D dataset slightly irregular in its 
> gridding.
> This should force veusz to resample the image to higher resolution. I can't
> remember how it chooses the resampled image size, but I think it takes the
> smallest difference between bin widths and resamples to that (with some 
> limit).
> 
> I should add an option to resample to XXX DPI.
> 
> Chers
> 
> Jeremy
> 
> On 05/12/2016 12:23 PM, Gromov, Sergey wrote:
> > Hi all,
> >
> > I have the same issue on Windows, up to the latest version.
> > My guess it has to do with extensive bitmap compression (it looks like jpg 
> > with
> colour compression), through which the colours indeed change sometimes
> substantially (read I cannot use this PDF for publication). SVG blurs the 
> bitmap,
> which is also bad.
> > See the example (pdf vs. png vs. svg) attached.
> >
> > I wonder if it is possible to produce PDFs with bitmaps replaced with 
> > primitives
> (i.e. matrices of boxes) of given colour... I did this trick when I had to 
> produce a
> vector output with image, i.e. reading the matrix and plotting it as 'xy' 
> with given
> coordinates and square symbol emulating pixels. But that is usually a lot of 
> work...
> >
> > Sergey
> >
> >
> >> -----Original Message-----
> >> From: Veusz-discuss [mailto:[email protected]] On Behalf
> >> Of Jeremy Sanders
> >> Sent: 12 May 2016 10:31
> >> To: Michael Clerx <[email protected]>; [email protected]
> >> Subject: Re: [Veusz-discuss] Image to pdf conversion
> >>
> >> On 11/05/16 23:24, Michael Clerx wrote:
> >>
> >>> I've used Veusz to create some nice 2d-density plots using the "image"
> >>> widget.
> >>> However, when I export my graph to PDF the colours change considerably.
> >>> I'm using the bluegreen colormap (inverted).
> >>>
> >>> Has anybody else experienced similar problems?
> >>
> >> I don't see the problem with the mandelbrot example with bluegreen on
> >> linux, after exporting to PDF. There is some smoothing introduced,
> >> but the colours look ok.
> >>
> >> What version and platform are you using?
> >>
> >> Thanks
> >>
> >> Jeremy
> >>
> >>
> >> _______________________________________________
> >> Veusz-discuss mailing list
> >> [email protected]
> >> https://mail.gna.org/listinfo/veusz-discuss
> >>
> >>
> >> _______________________________________________
> >> Veusz-discuss mailing list
> >> [email protected]
> >> https://mail.gna.org/listinfo/veusz-discuss
_______________________________________________
Veusz-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/veusz-discuss

Répondre à