Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2007
    Location
    Texas, USA
    Posts
    1,400
    Plugin Contributions
    1

    help question How hard would it be to check the color of a few different spots of a picture?

    A clean image is important for many different reasons. If you have thousands of pictures if can be hard to figure out what needs to be cleaned and what doesn't. Is there an easy way to check a pixel to see if it is pure white or not in php?

  2. #2
    Join Date
    Jun 2007
    Location
    Texas, USA
    Posts
    1,400
    Plugin Contributions
    1

    Default Re: How hard would it be to check the color of a few different spots of a picture?

    Wow! Interesting...

    $width = imagesx($resource);
    $height = imagesy($resource);


    for($x = 0; $x < $width; $x++) {
    for($y = 0; $y < $height; $y++) {
    // pixel color at (x, y)
    $color = imagecolorat($resource, $x, $y);
    }
    }

  3. #3
    Join Date
    Jun 2007
    Location
    Texas, USA
    Posts
    1,400
    Plugin Contributions
    1

    Default Re: How hard would it be to check the color of a few different spots of a picture?


 

 

Similar Threads

  1. I would like to duplicate this store, how hard?
    By Karm4 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 29 Jul 2010, 08:22 PM
  2. How hard would this be?
    By jill8026 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 13 Sep 2009, 08:49 AM
  3. How hard would it be....
    By 0be1 in forum General Questions
    Replies: 0
    Last Post: 4 Mar 2008, 09:43 PM
  4. How hard would this be? (shipping option uplift)
    By ellisn in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 15 Sep 2007, 10:38 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR