From 4324917a76d97b0b1c4da108aaa34dc2434f030b Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Tue, 28 Dec 2010 15:57:44 +0000 Subject: [PATCH] Updated manual regarding image alpha support for BMP, PNG, and TIFF handlers. For PNG it was mentioned only loading supports alpha, but alpha saving support has been available since r32414. Similarly there was no mention of alpha loading support for TIFF (supported since r47204) as well as BMP (since r54942). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/image.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/interface/wx/image.h b/interface/wx/image.h index 8e328bdd0c..703d247a1a 100644 --- a/interface/wx/image.h +++ b/interface/wx/image.h @@ -315,10 +315,12 @@ const unsigned char wxIMAGE_ALPHA_OPAQUE = 0xff; While all images have RGB data, not all images have an alpha channel. Before using wxImage::GetAlpha you should check if this image contains an alpha - channel with wxImage::HasAlpha. Note that currently only the PNG format has - full alpha channel support so only the images loaded from PNG files can have - alpha and, if you initialize the image alpha channel yourself using - wxImage::SetAlpha, you should save it in PNG format to avoid losing it. + channel with wxImage::HasAlpha. Currently the BMP, PNG, and TIFF format + handlers have full alpha channel support for loading so if you want to use + alpha you have to use one of these formats. If you initialize the image + alpha channel yourself using wxImage::SetAlpha, you should save it in PNG + format to avoid losing it as this is the only handler that currently + supports saving with alpha. @section image_handlers Available image handlers @@ -328,13 +330,13 @@ const unsigned char wxIMAGE_ALPHA_OPAQUE = 0xff; To use other image formats, install the appropriate handler with wxImage::AddHandler or call ::wxInitAllImageHandlers(). - - wxBMPHandler: For loading and saving, always installed. - - wxPNGHandler: For loading (including alpha support) and saving. + - wxBMPHandler: For loading (including alpha support) and saving, always installed. + - wxPNGHandler: For loading and saving. Includes alpha support. - wxJPEGHandler: For loading and saving. - wxGIFHandler: Only for loading, due to legal issues. - wxPCXHandler: For loading and saving (see below). - wxPNMHandler: For loading and saving (see below). - - wxTIFFHandler: For loading and saving. + - wxTIFFHandler: For loading (including alpha support) and saving. - wxTGAHandler: For loading only. - wxIFFHandler: For loading only. - wxXPMHandler: For loading and saving. -- 2.45.2