pixels argument of MagickGetImagePixels()
Posted: 2008-02-24T15:04:15-07:00
Hi,
I´m using PascalMagick port of ImageMagick but i can´t get MagickGetImagePixels to work. I think the problem is exactly on the last argument. How exactly the array dimensions should be?
I´m calling the function this way:
In delphi, DadosPixels is defined like Array of Array of Intenger. This way, I defined length of array using: MagickGetImageWidth(Image) * MagickGetImageHeight(Image) and then I was trying to access this way, for example:
DadosPixels[PixelNumber1][R] = pixeldatahere
DadosPixels[PixelNumber1][G] = pixeldatahere
DadosPixels[PixelNumber1] = pixeldatahere
DadosPixels[PixelNumber2][R] = pixeldatahere
DadosPixels[PixelNumber2][G] = pixeldatahere
DadosPixels[PixelNumber2] = pixeldatahere
What´s the correct way to define array dimensions and lenght?
I´m using PascalMagick port of ImageMagick but i can´t get MagickGetImagePixels to work. I think the problem is exactly on the last argument. How exactly the array dimensions should be?
I´m calling the function this way:
Code: Select all
MagickGetImagePixels(Image,0,0,MagickGetImageWidth(Image),MagickGetImageHeight(Image),'RGB',IntegerPixel,DadosPixels)
DadosPixels[PixelNumber1][R] = pixeldatahere
DadosPixels[PixelNumber1][G] = pixeldatahere
DadosPixels[PixelNumber1] = pixeldatahere
DadosPixels[PixelNumber2][R] = pixeldatahere
DadosPixels[PixelNumber2][G] = pixeldatahere
DadosPixels[PixelNumber2] = pixeldatahere
What´s the correct way to define array dimensions and lenght?