Comments (4)
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.
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.
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.
Fixed by yourself. Thanks!
from chunky_png.
Related Issues (20)
- Release gem with support for iTXt chunks? HOT 2
- undefined method `value' for #<ChunkyPNG::Chunk::InternationalText:0x000000038f46e0> HOT 1
- how to set DPI HOT 2
- Memory leak HOT 3
- NameError: uninitialized constant ChunkyPNG::Encoding where EMPTY_BYTEARRAY = "".force_encoding(Encoding::BINARY).freeze was changed from EMPTY_BYTEARRAY = force_binary(String.new).freeze HOT 1
- Frozen string literal usage unsupported in Ruby 1.9.x HOT 1
- NoMethodError: undefined method `b' for "\x00":String HOT 1
- Getting "can't modify frozen string (TypeError)" HOT 2
- Ruby 3.0.0
- Error by using watir-extensions-element-screenshot on Firefox 85.0.1 HOT 2
- .rbenv/versions/3.0.0/lib/ruby/3.0.0/set/sorted_set.rb:4:in `rescue in <top (required)>': The `SortedSet` class has been extracted from the `set` library.You must use the `sorted_set` gem or other alternatives. (RuntimeError) HOT 1
- from_rgb_stream : calculation of width and height HOT 6
- Changelog is missing entries from version 1.3.12 to 1.4.0 HOT 2
- Requires sorted_set gem with Ruby 3.0 HOT 3
- Wrong hue for #0A000A
- [Documentation] More examples?
- Write text on spicific position HOT 3
- spec test suite of chunky_png 1.4.0 fails with upcoming ruby32 due to Object#:~ removal
- ChunkyPNG::Canvas.from_file fails outside main Ractor HOT 1
- Output is non-deterministic HOT 1
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 chunky_png.