Comments (5)
Hopefully, this is caused by the other issue on which you commented (http://github.com/rmagick/rmagick/issues/issue/4) and has already been fixed in source. I'll try to reproduce it using my various versions and let you know if this is a separate bug.
from rmagick.
Unfortunately it appears to be caused by something else. Here's the output:
This is RMagick 0.0.0 (
Built with ImageMagick 6.6.2-3 2010-06-08 Q8 http://www.imagemagick.org
Built for ruby 1.9.1
Web page: http://rmagick.rubyforge.org
Email: [email protected]
red=254, green=254, blue=254, opacity=0
red=255, green=255, blue=255, opacity=0
red=255, green=227, blue=0, opacity=0
when running:
require 'RMagick'
puts Magick::Long_version
img = Magick::Image.read('input.png').first
puts img.pixel_color(0,0)
colors = Magick::Image.read('colors.png').first
puts colors.pixel_color(413,0)
img.remap(colors, Magick::NoDitherMethod)
puts img.pixel_color(0,0)
img.write('output.png')
from rmagick.
Hi,
What is your OS and architecture?
I can't seem to reproduce this problem. Here's my output using your images/program:
This is RMagick 0.0.0 (
Built with ImageMagick 6.6.2-4 2010-06-10 Q16 http://www.imagemagick.org
Built for ruby 1.9.1
Web page: http://rmagick.rubyforge.org
Email: [email protected]
red=65278, green=65278, blue=65278, opacity=0
red=65535, green=65535, blue=65535, opacity=0
red=65535, green=65535, blue=65535, opacity=0
And, the result is the following image:
http://tmp.omer.bar-or.org/bad_remap_out.png
I haven't yet looked into the difference between our two rgb values, and I've asked Benjamin to see if he can reproduce the problem.
I've tried RMagick 1.8.6, 1.8.7, and 1.9.1
I've tried ImageMagick 6.6.1-0, 6.6.2-3, and 6.6.2-4
from rmagick.
I'm running Ubuntu 10.04 LTS, "Lucid Lynx", 64 bit.
It's Q8 vs Q16. I recompiled with Q16 and get the same results as you.
Q16 however is not ideal for memory and speed reasons, so I'd much prefer being able to use Q8.
Does this imply that the bug is in ImageMagick? Sounds like it's similar to what's discussed here: http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=13021
(you'll need to edit out the amp; from that URL as the ampersand gets sanitized)
from rmagick.
Woops. You're right. I hadn't considered Q8 vs. Q16.
Yes, your issue does sound the same as the comment to which you linked, and the fact that it depends on Q8 vs. Q16 rather than on the ImageMagick version at least suggests that it is a bug in ImageMagick rather than RMagick. I'll play around and maybe try to talk to the ImageMagick folks, but based on that link, it unfortunately sounds like a known issue without a known solution for now.
from rmagick.
Related Issues (20)
- GEM HAS MOVED TO https://github.com/gemhome/rmagick/ HOT 5
- Update repos project URL HOT 2
- ImageMagick library function failed to return a result on from_blob HOT 2
- Magick::Pixel#opacity randomly returns 0 or 65535
- "checking for ImageMagick version >= 6.4.9... no" on Debian Sid + rbenv HOT 4
- Bundle Install doesn't work! HOT 2
- ImageList#append hangs HOT 1
- Please return self instead of Qnil when the image did not meet the qualifier. HOT 1
- fails to build on Debian Jessie HOT 3
- why columns and rows are wrong?
- Can't install gem on Ubuntu 15.04 HOT 20
- opaque on selected range of pixels HOT 1
- Draw#get_type_metrics throws exception on leading @ HOT 2
- How to upload file inside public folder to s3? HOT 1
- Unable to install rmagick gem in bitnami package
- Output Image has overlaid black rectangle on part of the pdf
- Typo 'blog' in rdocs for Method: Magick::Image.from_blob
- Windows binaries for ImageMagick 6.7.9.9 are no longer available
- no delegates
- how get pixel color
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 rmagick.