Adding watermark changes B&W compressed image to Color image

Discussions about image processing and document imaging.
Post Reply
Bharath
Posts: 3
Joined: Wed Jan 02, 2013 2:12 pm

Adding watermark changes B&W compressed image to Color image

Post by Bharath » Tue Jan 08, 2013 2:14 pm

Hi,

I was wondering if this is the right behaviour :!: after I add water mark and save of image which had setting of Black and White with compression the water marked image would be a color image.

Is it possible to retain the properties of image as well add watermark.

Below is the code I used.

MyImaging.DrawRotatedText_2(nImageID, 315,swaterm, 500, 1800, 72, 0,MyImaging.ARGBI(92,128,128,128), "Arial", true);
MyImaging.SaveAsTIFF(nImageID, sPagename, 65536);

Thanks,
Bharath

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: Adding watermark changes B&W compressed image to Color i

Post by SamiKharma » Tue Jan 08, 2013 4:27 pm

Hi,

No, simply because you are adding a color, which requires a bitdepth that supports color. Simply, after you Draw the Text, just convert the image to 1bpp again using:
https://www.gdpicture.com/guides/gdpicture/v9/html/con ... teger.html

Best Regards,
Sami

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests