I am trying to get my background color Red to show up against my transparent tiff image. It is not working. Pls let me know asap.
Dim imgBack1 As New Aspose.Pdf.Image(sec2) imgBack1.ImageInfo.File = backGroundBackURL 'Server.MapPath(backGroundBackURL) imgBack1.ImageInfo.ImageFileType = Aspose.Pdf.ImageFileType.Tiff
sec2.Paragraphs.Add(imgBack1)
sec2.BackgroundColor = New Aspose.Pdf.Color(sHexColor)
I've tested the scenario with one of my sample TIFF file and I am able to see both Image and BackGround color in my case. Please share the TIFF image that you are using, so that we can test the issue using that file.
the resultant pdf is not giving me the bacground color. Please let em know why that would be.
can you also upload the tiff file you created so i can see the background color with this image? i noticed the pdf test.pdf you created and I cannot see the red color bleow the calendar image. i can see red all around it but since calendar is transparent, I want to see the red color under the image itself.
You can access the TIFF file attached with in this forum thread. Regarding your requirement "background color Red to show up against my transparent tiff image", we are looking into this matter and will reply to you soon.
Please try the following code to set the image’s opacity: [C#]
Aspose.Pdf.Pdf pdf1 = new Aspose.Pdf.Pdf(); Aspose.Pdf.Section sec = pdf1.Sections.Add(); Aspose.Pdf.Image img = new
Aspose.Pdf.Image(sec); img.Opacity = 0.8F; // Gets or sets a float value between 0.0 and 1.0 that indicates the opacity of the image. The default value is 1.0. img.ImageInfo.File = @"E:/temp/calendar_transparent_300dpi.tif"; img.ImageInfo.ImageFileType = ImageFileType.Tiff; sec.Paragraphs.Add(img); sec.BackgroundColor = new Aspose.Pdf.Color("Red"); pdf1.Save("E:/temp/test.pdf");
we dont want the opacity - we want the transparent tiff to have the background red -if you noticed in yoru pdf, the background color is pinkish and not red. we want the background color red to show alongwith the image on top of it.
At present, we support transparent background for some image types(like Gif, Png, etc). I am not sure if the tiff image is transparent. As I can’t get the result as you expected in MS Word(see the attached doc). Please correct me if I miss something. Thanks.
Best regards.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.