GithubHelp home page GithubHelp logo

Comments (12)

briangonzalez avatar briangonzalez commented on June 10, 2024

Are they not working currently?

from jquery.adaptive-backgrounds.js.

timoreddig avatar timoreddig commented on June 10, 2024

They are working but not like I expected. I have two transparent PNGs and the dominant background color should be green. See my example images.

The smaller one works, the greater one not.

What´s wrong?

Is it possible to get a rgba value for the background color?

transparent_png_working
transparent_png_not_working

from jquery.adaptive-backgrounds.js.

briangonzalez avatar briangonzalez commented on June 10, 2024

Hmmm, it looks like for some reason when the majority of the image is not filled with non-transparent pixels, getImageData returns all zeros, denoting an all black image.

Can you verify?

from jquery.adaptive-backgrounds.js.

timoreddig avatar timoreddig commented on June 10, 2024

Yes, I can verify. I´ve done it with several transparent PNGs but it didn´t work the way I expected it.

By the way, you created a great plugin ;-)! Thanks for it.

from jquery.adaptive-backgrounds.js.

bishless avatar bishless commented on June 10, 2024

It's working for the transparent PNGs I'm throwing at it.
del0823x

Though, I'll 👍 the vote for the ability to set rgba() values. That'd be pretty sweet.

from jquery.adaptive-backgrounds.js.

briangonzalez avatar briangonzalez commented on June 10, 2024

Hmmm, interesting.

Those are transparent PNGs? Do you have a link?

from jquery.adaptive-backgrounds.js.

bishless avatar bishless commented on June 10, 2024

Yup. The 3 on the right are 256x256px trans PNGs. The icons usually show on a white background. Your script seems to work well!

Sorry. It's a vagrant box I'm developing on. No public site at this point.

from jquery.adaptive-backgrounds.js.

bishless avatar bishless commented on June 10, 2024

Here... Threw together a pen to screw around with. Includes one of the trans PNGs I'm using.

from jquery.adaptive-backgrounds.js.

briangonzalez avatar briangonzalez commented on June 10, 2024

Very cool!

from jquery.adaptive-backgrounds.js.

timoreddig avatar timoreddig commented on June 10, 2024

bishless,

are you working with png-8 or png-24?

from jquery.adaptive-backgrounds.js.

bishless avatar bishless commented on June 10, 2024

8-bit.

from jquery.adaptive-backgrounds.js.

timoreddig avatar timoreddig commented on June 10, 2024

Ok, thanks.

24-bit isn´t working for me.

from jquery.adaptive-backgrounds.js.

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.