Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, January 6, 2010 11:59:07 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 769


A common need is to convert an image with transparency (such as a PNG) to a format that does not have transparency (such as JPEG).  With LEADTOOLS, if you do a simple load and save, you will lose the alpha channel and the image will not look exactly the same.  Therefore you must make a background image (usually just a solid color) and blend the alpha channel and base image together with the FeatherAlphaBlendCommand.  This C# 2005 examples uses the .NET 16.5 interface to convert a transparent PNG file to a JPEG so that it will have the same look and feel as if it were displayed in Windows Picture and Fax Viewer (white background).
File Attachment(s):
NET - v16 - PNG to JPEG FeatherAlphaBlend.zip (15kb) downloaded 43 time(s).
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, August 20, 2012 5:27:15 AM(UTC)

Walter  
Walter

Groups: Tech Support, Administrators
Posts: 311

Was thanked: 3 time(s) in 3 post(s)

This project has been updated for use with LEADTOOLS v17.5 and Visual Studio 2010.
File Attachment(s):
NET - v17.5 - PNG to JPEG FeatherAlphaBlend.zip (127kb) downloaded 38 time(s).
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Sunday, June 23, 2013 10:50:53 PM(UTC)

Tamer_Irdais  
Guest

Groups: Guests
Posts: 3,049

Was thanked: 1 time(s) in 1 post(s)

Using an additional byte for each pixel to store an alpha mask (alpha channel) is a very common approach for representing transparency.
Many applications, both based on LEADTOOLS and non-LEAD imaging engines, support it in a uniform manner. Attached screenshot shows how MS Excel displays a 32-bit PNG file that has an alpha channel when that image is simply inserted into the sheet.
Guest attached the following image(s):
ExcelPng32.jpg
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2017, Yet Another Forum.NET
This page was generated in 0.179 seconds.