barby and more than 72 ppi

  • Thread starter Krzysztof Kotlarek
  • Start date
K

Krzysztof Kotlarek

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
 
T

Tore Darell

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/mythdpi.html

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/RMagick/doc/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,183
Messages
2,570,966
Members
47,515
Latest member
Harvey7327

Latest Threads

Top