Questions tagged [chunkypng]
14 questions
8
votes
1 answer
How to modify the color of images to remove vibrancy?
How I can change the colors from this:
into this:
I generated the output image using Gimp with the input image as layer one, and the background color from the image as layer two, in the Layers panel I selected the mode "colors"
I want preserve the…

astropanic
- 10,800
- 19
- 72
- 132
4
votes
2 answers
How to differentiate between a pixel with no color and a black pixel?
I am using ChunkyPNG in order to get the colors of pixels on images. When an image has no background color at all, and is rendered into a browser, the background color will become white (usually, depending on your browser configuration).
My…

Johnny Red
- 121
- 10
0
votes
1 answer
Chunky PNG Image comparison- How to highlight multiple Differences
I've just discovered this article, which talks about comparing two images in Ruby and highlighting the differences.
But if I have images with multiple differences, e.g.: one difference is in the header and the other in the footer it will draw a…
0
votes
2 answers
How do I get the hex value from each pixel in RMagick or Chunky_PNG?
I'm trying to read the value of each pixel as hex (HTML notation) using RMagick or Chunky_PNG e.g. #5DBCD2. At the moment I have the below which kind of does what I want but I couldn't find the right way to actually read the hex value. I'd prefer to…

ant
- 171
- 2
- 13
0
votes
0 answers
Can't identify a Stack level too deep error on rake task with recursive function
I have a big problem with a "Stack level too deep" error on my rake script. This script basically read an image that contains some pixels with value "-1". So I use a recursive function when found a "-1" value to analize their neightbors and save it…

jgiunta
- 3
- 2
0
votes
1 answer
ChunkyPNG: Is it possible to read an image directly from a URL?
I tried (with some success)
require 'open-uri'
require 'chunky_png'
image_url = "http://res.cloudinary.com/houlihan-lokey/image/upload/c_limit,h_75,w_120/ixl7z4c1czlvrqnbt0mm.png"
# image_url =…

aaandre
- 2,502
- 5
- 33
- 46
0
votes
1 answer
Using Qrio with rails. Works fine when i use it with ruby files, not working with rails
I want to decode QR codes in my rails app. I am using Qrio gem which needs ChunkyPng gem to work. It is working fine when i write and run a ruby program using it. But, when i try using it with Rails it does not work.
This isthe error i get.
No such…

Anil Dukkipatty
- 73
- 1
- 9
0
votes
1 answer
Corp image with ruby
I try to corp an image how you can see in my last line of code i trigger:
p.corp!(0,0,p.width,black_last).save('bearbeitet.png')
But somehow i get this error:
bild.rb:29:in `': undefined method `corp!' for #…

John Smith
- 6,105
- 16
- 58
- 109
0
votes
1 answer
Standard deviation with ChunkyPNG
I am trying to find the contrast of an image using ChunkyPNG. Is there any way to get the standard deviation of an image using ChunkyPNG?

Hommer Smith
- 26,772
- 56
- 167
- 296
0
votes
1 answer
Requiring gem in Ruby on Rails - OilyPNG vs ChunkyPNG
I am currently using ChunkyPNG, but I want to give OilyPNG a try. I have tried using it in a simple ruby script and the performance is much better. I basically install both gems in the Gemfile and require 'oily_png' in my script.
However, in my RoR…

Hommer Smith
- 26,772
- 56
- 167
- 296
0
votes
1 answer
Crop logo from Sprite using CSS attributes
Given a sprite, for example, StackOverflow sprite and CSS attributes such as:
background-position: 0px 0px;
width: 250px;
height: 61px;
I am able to crop the logo of the sprite with Chunky PNG library. However, some sites, have negative…

Hommer Smith
- 26,772
- 56
- 167
- 296
0
votes
2 answers
A while loop in a while loop in ruby
I'm relativly new to Ruby, or Programming at all, so please excuse me, if i'm making a "noob2 mistake with the logic here.
I am trying to get an output of rgba pixel values in binary for every pixel in an image (and it's location), using…

x3nu
- 5
- 1
-1
votes
1 answer
Understanding and Converting Ruby's ChunkyPNG to Javascript Equivalent
I am converting some RUBY code into Javascript.
This RUBY code uses ChunkyPNG Ruby Library.
Here is the Ruby Code:
def self.from_png(file)
image = ChunkyPNG::Image.from_file(file)
mask = Mask.new(image.height, image.width)
mask.rows.times do…

preston
- 3,721
- 6
- 46
- 78
-1
votes
1 answer
When I try to map out pi in colors with ChunkyPNG, I get many unexpected results
I am trying to calculate pi and put it into a picture in ruby.
It works up until lines 36 (where it doesn't write pi [without a decimal place] to file) and 63 (where it only writes the off white color to pi.png). As a side note, the program doesn't…

Jake L.
- 19
- 6