[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

barby and more than 72 ppi

Krzysztof Kotlarek

2/7/2009 12:22:00 AM

Hello.
I need your help.
I use barby to generate barcods (it`s great libary). However every png
that generate is 72 ppi. On the screen that looks beautiful but if i
want to print than i need 150 or 300 ppi. Could you tell me how to
generate this image? I looked also at gbarcode but i can`t find that
option.
Thanks for your help
--
Posted via http://www.ruby-....

1 Answer

Tore Darell

2/7/2009 11:41:00 PM

0

On Feb 7, 1:21 am, Krzysztof Kotlarek <lis...@wp.pl> wrote:
> Hello.
> I need your help.
> I use barby to generate barcods (it`s great libary). However every png
> that generate is 72 ppi. On the screen that looks beautiful but if i
> want to print than i need 150 or 300 ppi. Could you tell me how to
> generate this image? I looked also at gbarcode but i can`t find that
> option.

Usually you shouldn't have to set the PPI of an image - see
http://www.rideau-info.com/photos/my...

But you can set it by using the RmagickOutputter and generating a
Magick::Image instance with to_image:

barcode = Barby::Code128B.new('hello')
image = barcode.to_image
image.density = "300x300"
image.write('hello.png')

See http://www.imagemagick.org/RM...