Quantcast
Channel: Average Image Color in php for png/jpeg - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by lolo for Average Image Color in php for png/jpeg

I'v got it, it was a problem from my var object:$img = @imagecreatefromstring(file_get_contents($post_thumb));$x = imagesx($img);$y = imagesy($img);$tmp_img =...

View Article



Answer by dincan for Average Image Color in php for png/jpeg

Lolo, this is the function I use to have the average color of a picturefunction average($img) { $w = imagesx($img); $h = imagesy($img); $r = $g = $b = 0; for($y = 0; $y < $h; $y += 2) { for($x = 0;...

View Article

Average Image Color in php for png/jpeg

I want to calculate the average color of an image (png or jpg) in php.I want a little script that will go fast to calculate the average color.I tried by resizing an image to 1px by 1px but I didn't...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>