Comments (6)
Do you think you could do a pull request with a fix ?
from rqrcode.
Sure, shall I just remove the greyscale color mode or shall i check, if there is a color, then it's color, otherwise its greyscale?
from rqrcode.
I think a check would be the nicer option. Then the result wont change for does not setting the color =)
from rqrcode.
@lichtamberg do still wish do this fix?
from rqrcode.
Such code doesnt work with this PR.
png = qrcode.as_png(
resize_gte_to: false,
resize_exactly_to: false,
fill: '#FAFAFA',
color: '#f43c12',
size: 300,
border_modules: 4,
module_px_size: 6,
file: tmp_file.path # path to write
)
Colors dont work.
from rqrcode.
Hi all, I'm generating a QR code and - later - overlaying a color logo on it with mini_magick. The png returned by as_png
is a greyscale image even if I set color_mode: ChunkyPNG::COLOR_TRUECOLOR
, so the resulting image after I overlay my logo is greyscale. The hack I've found is to also set a foreground color, e.g. color: #111112
, but this is counter intuitive. I think that the color_mode
option, when set to ChunkyPNG::COLOR_TRUECOLOR
, should always return a PNG with the colorspace set to color, even if the QR code is black. What do you think?
from rqrcode.
Related Issues (20)
- Encore text in UTF-8 with ECI (Extended Channel Interpretation) HOT 1
- Resulting image blank HOT 3
- Problem SVG in PDF
- RQRCodeCore HOT 2
- SVG formatting is done with style attribute instead of fill, causing strict content security policies to fail
- How to set width and height of generated svg HOT 1
- Logo/text in center HOT 2
- Can't generate black QR codes using `000000` HOT 1
- An error occurred while updating rqcode
- undefined method `dark?' for #<RQRCode::QRCode:0x00005649dee622a0 HOT 2
- Rails HTML safe strings HOT 2
- The examples under the "Advanced Options" section in the README.md do not work HOT 1
- Lacking a CHANGELOG.md file HOT 2
- Not able to create image HOT 3
- Attributing Source HOT 1
- Edit @data of RQRCode::QRCode instance HOT 1
- Ability to add image to centre of QR code HOT 4
- Production server problem
- Logo inclusion HOT 2
- Ruby 3.0 support HOT 3
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 rqrcode.