Giter Club home page Giter Club logo

Comments (4)

wvanbergen avatar wvanbergen commented on May 22, 2024

The idea is that the Canvas class only handles pixel data. The image class handles other aspects that can be part of a PNG image (currently only metadata). SO it is correct that the Canvas class does not have the metadata member.

The question remains how you got this error. Do you have a code snippet that reproduces this issue?

from chunky_png.

didip avatar didip commented on May 22, 2024

We have just a plain ol' .scss file. See the following:

#buy_and_activity_feed { float: left;
  #like_event { height: 108px; }
  #activity { width: 206px; height: 317px; background: sprite-image("home/activity_feed.png") no-repeat; }
}

We of course use ChunkyPNG via Lemonade. The sprite css fails to generate because of this error.

from chunky_png.

didip avatar didip commented on May 22, 2024

If it helps, I've attached the following stacktrace:

NoMethodError on line 40 of /Users/didip/.rvm/gems/ree-1.8.7-2010.02/gems/chunky_png-0.9.0/lib/chunky_png/image.rb: undefined method `metadata=' for #<ChunkyPNG::Canvas:0x101129600>
  /Users/didip/.rvm/gems/ree-1.8.7-2010.02/gems/chunky_png-0.9.0/lib/chunky_png/canvas/png_decoding.rb:50:in `from_file'
  /Users/didip/.rvm/gems/ree-1.8.7-2010.02/gems/lemonade-0.3.4/lib/lemonade/lemonade.rb:9:in `generate_sprites'
  /Users/didip/.rvm/gems/ree-1.8.7-2010.02/gems/lemonade-0.3.4/lib/lemonade/lemonade.rb:7:in `each'
  /Users/didip/.rvm/gems/ree-1.8.7-2010.02/gems/lemonade-0.3.4/lib/lemonade/lemonade.rb:7:in `generate_sprites'
  /Users/didip/.rvm/gems/ree-1.8.7-2010.02/gems/lemonade-0.3.4/lib/lemonade/lemonade.rb:4:in `each'
  /Users/didip/.rvm/gems/ree-1.8.7-2010.02/gems/lemonade-0.3.4/lib/lemonade/lemonade.rb:4:in `generate_sprites'
  /Users/didip/.rvm/gems/ree-1.8.7-2010.02/gems/lemonade-0.3.4/lib/lemonade.rb:59:in `render'

from chunky_png.

wvanbergen avatar wvanbergen commented on May 22, 2024

Fixed by yourself. Thanks!

from chunky_png.

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.