Search found 9 matches

by swansail
2011-01-10T19:42:06-07:00
Forum: IMagick
Topic: How to create a small, 1bpp BMP text image?
Replies: 9
Views: 20775

Re: How to create a small, 1bpp BMP text image?

That works - excellent - thanks so much!
by swansail
2011-01-08T12:17:49-07:00
Forum: IMagick
Topic: How to create a small, 1bpp BMP text image?
Replies: 9
Views: 20775

How to create a small, 1bpp BMP text image?

I am trying to create a small 1bit per pixel black and white BMP text image, but I am always ending up with a 24 bit per pixel image output. I can generate the desired 1bpp image with convert using the monochrome option: convert -font URWGothicBook -pointsize 10 -size 128x48 -monochrome label:"Test ...
by swansail
2011-01-07T16:23:47-07:00
Forum: Users
Topic: How to create a small, 1bpp BMP text image?
Replies: 12
Views: 29123

Re: How to create a small, 1bpp BMP text image?

Ah, did not realize there is a separate IMagick forum. I will move the PHP part of this discussion there. Thanks for your help! To answer your questions, I only posted a portion of the code, I am setting the output to bmp. I was not able to find equivalents to the other commands you mentioned, but ...
by swansail
2011-01-07T14:47:54-07:00
Forum: Users
Topic: How to create a small, 1bpp BMP text image?
Replies: 12
Views: 29123

Re: How to create a small, 1bpp BMP text image?

Still no luck. Tried the following, but the output is still 24 bits/pixel ;-(

$image->setImageDepth(1);
$image->setImageColorSpace(imagick::COLORSPACE_GRAY);
$image->setImageType(imagick::IMGTYPE_BILEVEL);
by swansail
2011-01-06T14:27:52-07:00
Forum: Users
Topic: How to create a small, 1bpp BMP text image?
Replies: 12
Views: 29123

Re: How to create a small, 1bpp BMP text image?

I was using exec, but I am trying for a bit more speed and flexibility.

Is the monochrome option not available via the extension? I have everything else working - there must be some way to get it down to 1-bit...
by swansail
2011-01-06T07:27:05-07:00
Forum: Users
Topic: How to create a small, 1bpp BMP text image?
Replies: 12
Views: 29123

Re: How to create a small, 1bpp BMP text image?

So, now that I can create a 1bpp BMP image with convert, I am trying to create the same image via the PHP Imagick extension ( http://us2.php.net/manual/en/book.imagick.php ). The code below creates the image, but even though I have set the color space and depth, I am still getting a 24bpp output ...
by swansail
2010-12-21T17:41:41-07:00
Forum: Users
Topic: How to create a small, 1bpp BMP text image?
Replies: 12
Views: 29123

Re: How to create a small, 1bpp BMP text image?

Had a devil of a time installing the latest ImageMagick 6.6.6.6 rpm on Centos 5.5, its not very yummy... In case others run into the same issue... Removed the old with rpm -e ImageMagick Downloaded the new rpm from here, installed with rpm -ivh --nodeps Tried to run convert a couple of times, found ...
by swansail
2010-12-21T11:20:47-07:00
Forum: Users
Topic: How to create a small, 1bpp BMP text image?
Replies: 12
Views: 29123

Re: How to create a small, 1bpp BMP text image?

Interesting - I ran your command line (on CentOS 5.5) and then identify, and I get the output below. It is creating a file with gray in it? I would expect a file of size 128x48=6144 bytes, but it still produces a 24698 byte file. How big is your file? identify -verbose text.bmp Image: text.bmp ...
by swansail
2010-12-21T08:01:07-07:00
Forum: Users
Topic: How to create a small, 1bpp BMP text image?
Replies: 12
Views: 29123

How to create a small, 1bpp BMP text image?

I am trying to create a small, black and white BMP text image, but I am always ending up with a 24 bit per pixel image output. What am I missing? All of these produce a 24698 byte 24-bit image: convert -size 128x48 -monochrome -gravity center label:"This\nIs A\nTest" text.bmp convert -size 128x48 ...