Recent

Author Topic: PascalMagick Background Color  (Read 990 times)

datilas

  • New Member
  • *
  • Posts: 14
PascalMagick Background Color
« on: June 16, 2023, 04:03:21 pm »
I'm using the demo that is in:
...\fpc\examples\imagemagick -> wandemo.dpr
on the link:
https://wiki.freepascal.org/PascalMagick -> Demonstration program 1
when reading a .png image resize and save in .jpg
the background of the image turns black I would like to know how to change the background of the image to white.
Can someone help me?

datilas

  • New Member
  • *
  • Posts: 14
Re: PascalMagick Background Color
« Reply #1 on: June 16, 2023, 05:07:28 pm »
using:
MagickSetImageType(wand, TrueColorType{ColorSeparationMatteType});
PixelSetColor(back, 'rgb(255,255,255)');
MagickSetImageBackgroundColor(wand, back);

I got a bad result, follow the pictures
image.png : original
image-ColorSeparationMatteType.jpg: using ColorSeparationMatteType
image-TrueColorType.jpg: using TrueColorType

obs: I already used all types "type ImageType = ("

maybe someone has an idea?

« Last Edit: June 16, 2023, 05:12:23 pm by datilas »

 

TinyPortal © 2005-2018