Search found 1015 matches

by el_supremo
2011-12-07T08:35:15-07:00
Forum: MagickWand
Topic: remove alpha channel from TIFF
Replies: 4
Views: 33315

Re: remove alpha channel from TIFF

This should do it:

Code: Select all

MagickSetImageAlphaChannel($mgck_wnd,MW_DeactivateAlphaChannel);
Pete
by el_supremo
2011-12-05T14:31:40-07:00
Forum: Users
Topic: Identify Temp Text
Replies: 15
Views: 28734

Re: Identify Temp Text

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...
by el_supremo
2011-12-05T08:35:41-07:00
Forum: Bugs
Topic: setcolorimage differences with command line
Replies: 4
Views: 10756

Re: setcolorimage differences with command line

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"...
by el_supremo
2011-12-04T12:48:46-07:00
Forum: MagickWand
Topic: API equivalent of 'convert -format %c histogram:info'?
Replies: 3
Views: 18917

Re: API equivalent of 'convert -format %c histogram:info'?

This code might get you started. #include <windows.h> #include <wand/magick_wand.h> int sort_hist(PixelWand **p,PixelWand **q) { size_t ip,iq; ip = PixelGetColorCount(*p); iq = PixelGetColorCount(*q); if(ip > iq)return(1); if(ip < iq)return(-1); return(0); } void test_wand(void) { MagickWand *mw = N...
by el_supremo
2011-12-03T14:04:19-07:00
Forum: Users
Topic: Accessing Pixel
Replies: 9
Views: 17651

Re: Accessing Pixel

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...
by el_supremo
2011-12-01T07:55:46-07:00
Forum: Users
Topic: Using Mask with images
Replies: 3
Views: 8584

Re: Using Mask with images

That suggests that you are using an older version of IM which does not support "-alpha extract".
Which version are you using?

Pete
by el_supremo
2011-12-01T07:53:55-07:00
Forum: Users
Topic: Accessing Pixel
Replies: 9
Views: 17651

Re: Accessing Pixel

I'm glad it helped. I'll add it to my MagickWand examples page later today.

Pete
by el_supremo
2011-11-30T16:47:39-07:00
Forum: Bugs
Topic: convert -shave ruins image quality and strips OCR'd text
Replies: 7
Views: 16596

Re: convert -shave ruins image quality and strips OCR'd text

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 ...
by el_supremo
2011-11-29T13:00:19-07:00
Forum: Users
Topic: Accessing Pixel
Replies: 9
Views: 17651

Re: Accessing Pixel

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...
by el_supremo
2011-11-14T08:29:26-07:00
Forum: Users
Topic: bending text using imagick api
Replies: 4
Views: 9997

Re: bending text using imagick api

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...
by el_supremo
2011-11-03T16:22:51-07:00
Forum: Bugs
Topic: cannot convert pdf pages selectively to jpg
Replies: 3
Views: 8347

Re: cannot convert pdf pages selectively to jpg

Do you have Ghostscript installed? ImageMagick uses GS to convert the PDF.

Pete
by el_supremo
2011-11-01T14:48:49-07:00
Forum: Users
Topic: Issues executing a bash script
Replies: 3
Views: 6975

Re: Issues executing a bash script

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?

Pete
by el_supremo
2011-10-12T18:39:35-07:00
Forum: Users
Topic: C-code compile of Magick core API on Win32
Replies: 1
Views: 4480

Re: C-code compile of Magick core API on Win32

I have one simple example of using MagickCore in C on my website at my sig below - I use the MSVC compiler though.
The specific link to the code is:
http://members.shaw.ca/el.supremo/Magic ... ckCore.htm

Pete
by el_supremo
2011-10-07T07:45:30-07:00
Forum: Users
Topic: No output generated in [!1]
Replies: 7
Views: 16145

Re: No output generated in [!1]

This "[!1]" doesn't work, but this "[!1] " does.

Pete
by el_supremo
2011-10-06T18:39:23-07:00
Forum: Users
Topic: Printing Pixels
Replies: 5
Views: 10975

Re: Printing Pixels

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...