Giter VIP home page Giter VIP logo

Comments (5)

baror avatar baror commented on September 5, 2024

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.

jxtps avatar jxtps commented on September 5, 2024

Unfortunately it appears to be caused by something else. Here's the output:

This is RMagick 0.0.0 ($Date: 2009/12/20 02:33:33 $) Copyright (C) 2009 by Timothy P. Hunter
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.

baror avatar baror commented on September 5, 2024

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 ($Date: 2009/12/20 02:33:33 $) Copyright (C) 2009 by Timothy P. Hunter
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.

jxtps avatar jxtps commented on September 5, 2024

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.

baror avatar baror commented on September 5, 2024

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)

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.