Giter Site home page Giter Site logo

Comments (6)

bjornblomqvist avatar bjornblomqvist commented on May 18, 2024

Do you think you could do a pull request with a fix ?

from rqrcode.

h0jeZvgoxFepBQ2C avatar h0jeZvgoxFepBQ2C commented on May 18, 2024

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.

bjornblomqvist avatar bjornblomqvist commented on May 18, 2024

I think a check would be the nicer option. Then the result wont change for does not setting the color =)

from rqrcode.

bjornblomqvist avatar bjornblomqvist commented on May 18, 2024

@lichtamberg do still wish do this fix?

from rqrcode.

CostaRico avatar CostaRico commented on May 18, 2024

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.

metalelf0 avatar metalelf0 commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.