Comments (10)
Coming to the party late. I'm finding it useful to generate png qr codes that are larger than the smallest possible, and having good luck using the xdim
attribute:
barcode = Barby::QrCode.new("http://github.com/")
File.open('barcode3.png', 'w'){|f| f.write barcode.to_png(xdim: 5) }
from barby.
How do you know it ignores them? And where did you find out about them?
On Oct 1, 2013, at 11:51, Kasper Grubbe wrote:
I am using Barby 0.5.1 with chunky_png 1.2.8.
require 'RMagick'
include Magick
require 'barby'
require 'barby/barcode/code_128'
require 'barby/outputter/png_outputter'def draw_barcode2(id, options = {})
barcodes_dir = FileUtils.mkdir_p("/Users/kasper/projects/barcoda/barcodes")
filepath = File.join(barcodes_dir, "#{id}")
filepath = "#{filepath}-rotated" if options[:rotate]
filepath = "#{filepath}.png"
barcode = Barby::Code128B.new(id)
File.open(File.join(filepath), 'w') do |f|
f.write barcode.to_image(:margin => 0,
:height => options[:height],
:width => options[:width])
end
end
I tehn run it as:puts draw_barcode2('1-4-019', :width => 70, :height => 260, :rotate => true)
puts draw_barcode2('1-4-019', :width => 70, :height => 260, :rotate => false)
puts draw_barcode2 '1-4-021', :width => 280, :height => 70puts draw_barcode2('1-4-020', :width => 70, :height => 260, :rotate => true)
puts draw_barcode2('1-4-020', :width => 70, :height => 260, :rotate => false)
puts draw_barcode2 '1-4-021', :width => 280, :height => 70Retina:
puts draw_barcode2 '1-4-022', :width => 560, :height => 120
—
Reply to this email directly or view it on GitHub.
from barby.
I'm seeing this issue too.
barcode.to_png(height: 100, width: 600, margin: 5)
Gives me an image with a width of 364px.
from barby.
Having the same problem here. Generates 100px qrcodes, no matter the options informed
from barby.
There is no width option.
from barby.
I'm not using width option
require 'barby'
require 'barby/barcode/qr_code'
require 'barby/outputter/png_outputter'
barcode = Barby::QrCode.new("http://github.com/")
File.open('barcode3.png', 'w'){|f| f.write barcode.to_png(height: 300, margin: 5) }
The options are completely ignored
from barby.
You need to be more specific. What results are you expecting and what are you seeing?
from barby.
I expect a 300px height png, and I'm getting a 100px height png
Regards,
Sandro
On Monday, May 5, 2014, Tore Darell [email protected] wrote:
You need to be more specific. What results are you expecting and what are
you seeing?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/30#issuecomment-42207625
.
Sandro Duarte
Analista de Sistemas
STI/SADES
TRE-RS
from barby.
Ok; the height option isn't valid for 2D barcodes, for the same reason that
width isn't available for any barcode: It's not possible to impose those
dimensions on the result without corrupting it.
On Tue, May 6, 2014 at 11:32 PM, Sandro Duarte [email protected]:
I expect a 300px height png, and I'm getting a 100px height png
Regards,
Sandro
On Monday, May 5, 2014, Tore Darell [email protected] wrote:
You need to be more specific. What results are you expecting and what
are
you seeing?—
Reply to this email directly or view it on GitHub<
https://github.com/toretore/barby/issues/30#issuecomment-42207625>
.Sandro Duarte
Analista de Sistemas
STI/SADES
TRE-RS—
Reply to this email directly or view it on GitHubhttps://github.com//issues/30#issuecomment-42362037
.
from barby.
as a response to cluesque's comment, going smaller is not possible, xdim: 1, is the default and as small as you can go using the png_outputter
from barby.
Related Issues (20)
- 'barby/outputter/rmagick_outputter' crashes with ImageMagick 6.9.11-0 HOT 1
- Support UPC-E
- HtmlOutputter give just thin strip of barcode.
- /.../n has a non escaped non ASCII character in non ASCII-8BIT script
- How to keep space between barcode lines or how to make the barcode line thin? HOT 2
- code128 generation is different with another lib with the same format
- Rmagick Outputter Deprecation Warning HOT 1
- NoMethodError Exception: undefined method `background_color=' for Barby::RmagickOutputter HOT 2
- Gem Load Error is: The `SortedSet` class has been extracted from the `set` library
- How can I generate barcode when wording including "\r"? HOT 1
- Add MaxiCode HOT 4
- Adding barcode value below the image HOT 2
- segfault generating datamatrix barcode HOT 3
- minimagick outputter HOT 1
- Udate Documentation
- has a non escaped non ASCII character in non ASCII-8BIT script
- Error to_line
- Code128B replace "-" for apostrophe HOT 2
- Is barby still maintained?
- [Question] Version 0.6.1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from barby.