When I try Fred's command it fails with: Magick: unable to open image `#12345': No such file or directory @ error/blob.c/OpenBlob/2589. Magick: no decode delegate for this image format `#12345' @ error/constitute.c/ReadImage/532. The fill value should have an even number of digits. #123456 works and...
Your code isn't the same as the command line. See if this works: $pdf='testcard.pdf'; $im->setColorSpace( imagick::COLORSPACE_RGB ); $im->setImageColorSpace( imagick::COLORSPACE_RGB ); $im = new imagick($pdf.'[0]'); $im->setImageFormat( "jpg" ); header( "Content-Type: image/jpeg"...
PixelGetNextIteratorRow sets that variable to the number of pixelwands that it returns. In this case I only asked for one pixel and it's in the middle of the image so it can't return zero. In the general case though you would have to check the value of x after calling PixelGetNextIteratorRow to make...
1. The image in out.pdf is seriously degraded, to the point where the text goes from crisp to completely unreadable. You need to specify a density for the PDF otherwise it will default to 72dpi which will make text look horrible. Try this: convert -density 300 in.pdf -shave 20x20 out.pdf This will ...
This code reads the built-in logo: image and changes the pixel at 200,100 to red. [EDIT] I've modified the code to use Region Iterator, as in my original version, or to use a DrawingWand as suggested by Anthony. Pete // Change the colour of one pixel in the logo: image // using either DrawPoint or a...
I don't know or use PHP but that does appear to be the correct way to use distort according to http://ca.php.net/manual/en/function.imagick-distortimage.php I have done the same kind of thing in C and it works. See the code for text effect 3 in http://members.shaw.ca/el.supremo/MagickWand/text_effec...
It looks like the shell file you are using has DOS line endings which might be causing the problems with '\r'.
Can you convert the file so that it has only linefeeds ('\n') at the end?
Change the second half of your code to this: PixelIterator * rg_itr; PixelWand ** pixels; int n; for (n=0;n<n_sbimg;n++) { rg_itr=NewPixelRegionIterator(wand,col[n],row[n],sbimg_wdt,sbimg_hgt); printf("\nsubimage %d\n",n); for (y=0; y<sbimg_hgt; y++) { printf("row %d\n",y); pixel...