[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

RMagick convert EPS to PNG => poor quality

RHjorth

3/25/2008 1:01:00 PM

Hi all,

After some initial troubles having RMagick (and ImageMagick) working
on windows, it finally works and quite well I might add.

However when convertin a EPS (yes, a barcode) to PNG (and rotating it)
the quality are unusable poor - the code for doing it are faily
simple:

psc = Magick::ImageList.new(ps_name)
psc.density = "300x300"
psc = psc.rotate(270)
psc.write(im_name)

I think the density are ignored.

What else am I doing wrong?

Please help me out here :)
2 Answers

Tim Hunter

3/25/2008 1:27:00 PM

0

RHjorth wrote:
> Hi all,
>
> After some initial troubles having RMagick (and ImageMagick) working
> on windows, it finally works and quite well I might add.
>
> However when convertin a EPS (yes, a barcode) to PNG (and rotating it)
> the quality are unusable poor - the code for doing it are faily
> simple:
>
> psc = Magick::ImageList.new(ps_name)
> psc.density = "300x300"
> psc = psc.rotate(270)
> psc.write(im_name)
>
> I think the density are ignored.
>
> What else am I doing wrong?
>
> Please help me out here :)

This is a tricky conversion that typically generates a lot of questions
in the ImageMagick forum. The problem is that the Ghostscript fonts
aren't designed for low-resolution devices like monitors.

Try specifying the density when reading the image, like this:

psc = Magick::Image.read(ps_name) { self.density = "300x300" }.first

If that doesn't help, open a Support Request on the RMagick project on
RubyForge and attach a copy of your EPS file. I'll be glad to take a
look and consult with the IM developers if necessary.


--
Posted via http://www.ruby-....

RHjorth

3/25/2008 2:25:00 PM

0

Hi Tim,

Absolutely brilliant - thanks!

/René

On 25 Mar., 14:27, Tim Hunter <rmag...@gmail.com> wrote:
> RHjorth wrote:
> > Hi all,
>
> > After some initial troubles having RMagick (and ImageMagick) working
> > on windows, it finally works and quite well I might add.
>
> > However when convertin a EPS (yes, a barcode) to PNG (and rotating it)
> > the quality are unusable poor - the code for doing it are faily
> > simple:
>
> > psc = Magick::ImageList.new(ps_name)
> > psc.density = "300x300"
> > psc = psc.rotate(270)
> > psc.write(im_name)
>
> > I think the density are ignored.
>
> > What else am I doing wrong?
>
> > Please help me out here :)
>
> This is a tricky conversion that typically generates a lot of questions
> in the ImageMagick forum. The problem is that the Ghostscript fonts
> aren't designed for low-resolution devices like monitors.
>
> Try specifying the density when reading the image, like this:
>
> psc = Magick::Image.read(ps_name) { self.density = "300x300" }.first
>
> If that doesn't help, open a Support Request on the RMagick project on
> RubyForge and attach a copy of your EPS file. I'll be glad to take a
> look and consult with the IM developers if necessary.
>
> --
> Posted viahttp://www.ruby-fo... Skjul tekst i anførselstegn -
>
> - Vis tekst i anførselstegn -