Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Compile/load problem with graphics library



> I am also using various image functions directly from PHP, but this is 
> (simple) pixel twiddling, and I can't remember whether I couldn't find 
> anything to access a single pixel value directly from php,...

Yes - though it appears you have to iterate through the whole image, so
random access pixel setting might be a bit complex/inefficient:
    https://stackoverflow.com/a/17541462/841830

That sounded a bit unlikely, so I poked around and found you can grab
pixels into an array, then set them back:

  http://php.net/manual/en/imagick.exportimagepixels.php
  http://php.net/manual/en/imagick.importimagepixels.php

(and, of course, you could set width/height to 1 to do a single pixel).
But it needs ImageMagick 6.4.5 or later.

Darren


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links