Search found 36 matches

by anotherprogrammer123
2011-01-05T21:47:34-07:00
Forum: Developers
Topic: BITMAPINFOHEADER + buffer to Magick::Image
Replies: 5
Views: 13455

Re: BITMAPINFOHEADER + buffer to Magick::Image

Hello again. This is the solution that I came up with: int bitmapToMagick(BITMAPINFOHEADER* bmiHeader, char* pixels, size_t length, Magick::Image* Image) { try { Image->read(bmiHeader->biWidth, abs(bmiHeader->biHeight), "BGR", Magick::CharPixel, pixels); Image->flip(); } catch (...) { return 1 ...
by anotherprogrammer123
2011-01-02T09:46:39-07:00
Forum: Developers
Topic: BITMAPINFOHEADER + buffer to Magick::Image
Replies: 5
Views: 13455

Re: BITMAPINFOHEADER + buffer to Magick::Image

[please delete this post]
by anotherprogrammer123
2011-01-02T08:37:06-07:00
Forum: Developers
Topic: Image crop
Replies: 17
Views: 33557

Re: Image crop

What are you trying to do exactly?

To crop, use the Crop command in Magick++:

Code: Select all

// Crop the image to specified size (width, height, xOffset, yOffset)
    image.crop( Geometry(100,100, 100, 100) );
by anotherprogrammer123
2010-12-31T12:21:39-07:00
Forum: Developers
Topic: BITMAPINFOHEADER + buffer to Magick::Image
Replies: 5
Views: 13455

Re: BITMAPINFOHEADER + buffer to Magick::Image

[please delete this post]
by anotherprogrammer123
2010-12-30T17:37:43-07:00
Forum: Developers
Topic: BITMAPINFOHEADER + buffer to Magick::Image
Replies: 5
Views: 13455

BITMAPINFOHEADER + buffer to Magick::Image

Hello, ( Here is a similar topic I posted back earlier (and found a solution to). ) For a DirectShow application, I want to transfer a BITMAP image info a Magick::Image. Basically, I have a BITMAPINFOHEADER and a BYTE* buffer pointing to the pixel data of the bitmap described by the BITMAPINFOHEADER ...
by anotherprogrammer123
2010-12-29T20:47:02-07:00
Forum: Users
Topic: Using InitializeMagick without *argv in C++
Replies: 3
Views: 13947

Re: Using InitializeMagick without *argv in C++

Or, you can use _getcwd: http://msdn.microsoft.com/en-us/library ... 80%29.aspx
Maybe ImageMagick uses this internally?
by anotherprogrammer123
2010-08-28T14:16:05-07:00
Forum: Users
Topic: writeImages() uses a LOT of memory
Replies: 4
Views: 9494

Re: writeImages() uses a LOT of memory

:( that's kind of disappointing, but thanks again for the response!
by anotherprogrammer123
2010-08-28T13:00:35-07:00
Forum: Users
Topic: writeImages() uses a LOT of memory
Replies: 4
Views: 9494

Re: writeImages() uses a LOT of memory

Thanks, that works. But it costs a lot of efficiency, which is kind of important for my case.

I meant above that Magick++ should only need access to 1 image at a time, right? So, is there some container I can use that frees memory as each elements is accessed? Or, would this mess up writeImages()?
by anotherprogrammer123
2010-08-28T11:30:27-07:00
Forum: Users
Topic: writeImages() uses a LOT of memory
Replies: 4
Views: 9494

writeImages() uses a LOT of memory

Hi, I am storing images in my own image format and converting them to magick++ for file/save operations. When I use writeImages() on lets say 7 images, I have to store 7 times as much pixel data in memory into a STL container in order to call writeImages(). Even though magick++ is reference counted ...
by anotherprogrammer123
2010-08-27T21:09:50-07:00
Forum: Users
Topic: Creating animated GIFs using Magick++/MagickCore APIs
Replies: 2
Views: 11036

Re: Creating animated GIFs using Magick++/MagickCore APIs

Thanks. Took me a while to find this by searching. If you are trying to write multi-page TIFF files, just do this: vector<Magick::Image> frames; Magick::Image img1("D:/img.bmp"), img2 ("D:/leaves.jpg"); img1.compressType(MagickLib::JPEGCompression); img1.quality(20); //set JPEG compression at 20 ...
by anotherprogrammer123
2010-08-20T12:37:59-07:00
Forum: Users
Topic: How to load Windows DIB in Magick++? [SOLVED]
Replies: 9
Views: 21557

Re: How to load Windows DIB?

Thanks so much guys. I figured out the problem! I think I did pointer arithmetic wrong. I was also not taking into account the RGBQUAD structures. Here is the new function. Hope it helps future searches out: int handleToImage(HANDLE bitmap, MYIMAGE &image) const { //Get the header of the bitmap ...
by anotherprogrammer123
2010-08-19T20:12:32-07:00
Forum: Users
Topic: How to load Windows DIB in Magick++? [SOLVED]
Replies: 9
Views: 21557

Re: How to load Windows DIB?

Hi guys, I am still totally confused on this. First, I define this function: unsigned char *LoadBitmapFile(char *filename, BITMAPINFOHEADER *bitmapInfoHeader) { FILE *filePtr; //our file pointer BITMAPFILEHEADER bitmapFileHeader; //our bitmap file header unsigned char *bitmapImage; //store image ...
by anotherprogrammer123
2010-07-25T19:23:36-07:00
Forum: Developers
Topic: draw image to a windows handle?
Replies: 6
Views: 13944

Re: draw image to a windows handle?

Hi, in case it helps, to display images while debugging, I have: 1. Compress them losslessly to a temporary .tif file 2. Open this file in Windows Paint using system("mspaint ~temp.tif") 3. Delete the file from the hard drive This has worked nicely for me. Note that the program is paused until you ...
by anotherprogrammer123
2010-06-18T15:15:48-07:00
Forum: Users
Topic: Create Image instance from in-memory monochrome data
Replies: 9
Views: 19729

Re: Create Image instance from in-memory monochrome data

bilevel is just binary. Pure black and white, no colors saved in the file. I tried this, but all pixels become white! //Set the image type to bilevel (black-and-white, 1 bit per pixel) magickImage.type(MagickLib::BilevelType); //The current pixel in 'magickImage' MagickLib::PixelPacket ...
by anotherprogrammer123
2010-06-17T20:25:29-07:00
Forum: Users
Topic: Create Image instance from in-memory monochrome data
Replies: 9
Views: 19729

Re: Create Image instance from in-memory monochrome data

Thanks for the information about the storage and the link, but why does my code above not work with BilevelType?