Gdiplus load png. No need to download GDI+ separately for VS platform.
Gdiplus load png The The below code worked for me. Syntax Bitmap * FromResource( [in] HINSTANCE hInstance, [in] const WCHAR *bitmapName ); Parameters [in] hInstance. 100 RCDATA "image. I have up to 80 largish PNG images to load into a single image object containing all 80 images. Viewed 4k times 4 . You can nuke them by changin the first one, the NULL to 0, the second one can be neutered by putting (wchar_t*) immediately preceding the capital L. Thread starter bobsan42; Start date Aug 25, 2021; bobsan42 Well-known Member to load a wide variety 'of image types from disk - including png. Inheritance. com New Forum Link masmforum WebSite. If it doesn't, you'll probably have to load the resource manually using LoadResource() then create the Gdiplus::Image object from a stream. When using ARIAL font, text looks okay, no problems. Add GDIplus to the MFC project and report as soon as it is compiled. Main Menu Home; Search; February 11, 2025, 10:23:04 PM. Hi guys, I want to create a graphic set the background color On the background I want to draw a transparent PNG file Write a text below the image from the PNG file Width of the resulting graphic should be determined by the width of the PNG file Height of the resulting graphic should be determined I don't know if loading it as a Gdiplus::Image with the resource ID will then still work. Is there any control that VB6 provides? If not, is there some workaround that I can load PNG image? Your code In this article. But PNG's transparency Part and none AntiAlias edge got weird effect when draw on Meta DC which created from Printer. DrawImageUnscaled(png The subroutine below is an example of code you can execute in design-mode to load PNG images into userforms/userform controls. (Note: If I load the file by it's filename, rather than by resource, it works. To display an image, you need a Graphics object and an Image object. : GetEncoderClsid is not a library function, it is an example helper defined here. Can u give me some sample code? Thanks,-----Reji Dasan, Technical Analyst, Bangalore, India. png images the proper way with GDI+ , its my understanding that I need to create a bitmap , canvas but to be honest I dont The Gdiplus:Image class supports Image objects from a variety of file types including BMP, ICON, GIF, JPEG, Exif, PNG, TIFF, WMF, and EMF. Skip to main content. This code loads the image and then converts it to a StdPicture object to use it in Visual Basic controls. Modified 15 years ago. To be more precise about GdiplusShutdown because that seems to Hi I am using VS 2012 and making a app which displays several texts via GDI+ DrawText. Everything works fine on a 32bit installation of Microsoft Office 2021, however, when using the workbook on a system with 64bit installation of Microsoft Office, the images are not being displayed (the download code works fine on 32bit/64bit). jpg". I have included gdiplus. Following example results just in black picture: png; gdi+; embedded-resource; Share. The small Open Source SynGdiPlus library is able to load and save gif, tiff and png pictures. ) For 2. Asking for help, clarification, or responding to other answers. But when I Can anyone point me to a good tutorial on loading jpg's, png's, tif's, etc? I have been studying bitmaps and BLT functions. 5 Bitmap::FromFile method returns NULL on x86. dll" (ByVal FileName As Long, GpImage As Long) As Long 'Load Png (Bubbelbilden) to Picture Control Sub PngPictureLoad(PathFilename As String, PictureControl As PictureBox, AutoResize As Boolean) Dim Token As Long I have a user form that displays an image (downloaded using another standard VBA module). The pixel format END TYPE TYPE GdiplusStartupOutput NotificationHook AS DWORD NotificationUnhook AS DWORD END TYPE DECLARE FUNCTION GdipCreateBitmapFromFile LIB "GDIPLUS. Well, GDI+ can easily create an HBITMAP from PNG data in an IStream or file, but going from a resource to an IStream takes some work. g. Option Explicit Option Private Module Private Type GUID Data1 As Long Data2 As Integer Data3 As Integer Data4(0 To 7) As Byte End Type Private Type PICTDESC Size As Long Type As Long hPic As Long hPal As Long End Type Private Type GdiplusStartupInput GdiplusVersion As Long In this article. I have an feeling that the dithering If you're loading the images from a resource file, then no, you can't use PNGs, you have to use ICOs. I want to share how to enable trasparency on a windows with PNG image using WINAPI and GDI+. Assuming that you want to load a PNG file (located at "D:\sample. This can be a nice way to reduce dependencies if you prefer using OS features over external libraries. Morcillo '----- ' Public Function LoadPicturePlus( _ ByVal filename As You're welcome. There is only 1 line of code: GdipSaveImageToFile() which doesn't work I and don't know to debug this line. lib as a reference to the project. :) Yup, I get those two warnings too. I understand modifying my code would be lots of work but I do wonder If you can show your sample when loading the image from file instead of a screenshot as I get really confused by as to where to add in my image since im not doing any screenshots. I can't get GDI+ to load cursors, but changing the ICONDIR to fool GDI+ into thinking cursors are icons, the job can be done. I have no problem using the Bitmap pbject constructor to load a bmp I have started to toy around with GDI+ in Delphi 2009. What is the modern/standard way of doing this and extracting the data? I am currently writing an application in C++ that uses OpenGL as the graphics engine (I chose it for the faster development time compared to Vulkan, even though I really want to GDI+ is part of the Microsoft Windows SDK, and it needs to be initialized when the application starts up. – Tom. But when I use different fonts in the If it is being saved to disk, i. com. (PaletteFlags and PaletteCount) ' GDI+ functions Private Declare Function GdipLoadImageFromFile Lib "gdiplus. If you follow the instructions in the answer, you'll see what they're actually doing is Using GDI+, I'm trying to create a brush with a PNG as the image that is loaded from the resources. See its documentation here. When compiling with VS 2010, it still crashes regardless of that. cpp This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. While I haven't ever tried it, you should be able to use StretchDIBits to display the PNG thanks for your reply nine , my searching have brought me this direction as well. I developed a small program in MFC that can display shapes and move them around. The Graphics object provides Hi all, I've been searching all day for a way to load a 32-bit png image from a ressource in my app (from it's ID) and draw it in the specified device context, while keeping alpha transparency? I tried numerous things but none of them works (Win GDI, GDI+). 3. The following example constructs Image objects from a variety of file types and then I've written a small function that will allow you to load JPG/PNG images from resource using GDI+: Code Select Expand gdiplusLoadBitmapFromResource, hInstance, Hi guys I have tried to figure out how to load . Use GetIconInfo to get the ICONINFO. If I label the PNG file in the resource file as a BITMAP, it returns an error, and if I label it as PNG, then nothing is loaded into the Bitmap object in the main code. The IStream can be used to initialize a Gdi+ To function, all GDI+ objects require that GDI+ be in an initialized state. It would appear that the problem is GdiPlus not respecting the alpha when you construct a GdiPlus::Bitmap from an HICON. 0 GDI+ Image class problem. March 28th, 2007, 06:24 AM #5 GDI+ for this, but this works more slowly, I think a good way to do that is to use other image lib on codeguru. Fortunately, there are a number of tools that can convert PNGs into ICOs, including ImageMagick (great for automation), and MSPaint as a lowest common denominator. So I added the ttf files to the resources and made an BINARY Object out of this ttf files. Learn more about bidirectional Unicode characters Here something I cooked up to load bitmaps or icons and save them as PNG icons using GdiPlus. To review, open the file in an editor that reveals hidden Unicode characters. For example, you can IWICBitmapSource * LoadBitmapFromStream(IStream * ipImageStream) { // initialize return value IWICBitmapSource * ipBitmap = NULL; // load WIC's PNG decoder You can construct Image objects from a variety of graphics file formats: BMP, GIF, JPEG, Exif, PNG, TIFF, WMF, EMF, and ICON. But I wanted to use my own ttf fonts for the texts. Initialize GDI+ by calling GdiplusStartup. I am I am comparing both the loaded from PNG resource bitmap and the temporary bitmap, and they only differ in the DPI and Flags. 0 c++ GDI Bitmap doesn't want to load. You can construct Image objects from a variety of file types including BMP, ICON, GIF, JPEG, Exif, PNG, TIFF, WMF, and EMF. png", GDI+ load PNG image, Programmer All, we have been working hard to make a technical sharing website that all programmers love. 283185307 #define PIHALF vc++ loading transparent png image method-GDI+ and CImage two. I create my button with this function: HWND MyControls::CreateButton(LPCTSTR Hi, I want to resize a png image with GDIPlus (and WinAPI), but the problem is that when I try to resize it, it does not appear on screen . h> #include <stdio. GDI+ is relied upon to parse/load TIF and PNG. All help is much appreciated. Then parse the mask and set alpha channel for opaque bits in DIB to 255. dll library, which is available since Windows XP. When compiled on VS 2008, I found that inserting code into the IStream::AddRef method, such as a cout, made the problem go away. Gdiplus::Image from byte array. 1. The Image class implements GdiplusBase. Height, PixelFormat. hbmColor is the handle of the transparent bitmap. If you're loading image files at runtime, then you can load any type of image format you want Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. but to load a PNG, my custom IStream had to also implement IImageBytes (defined in one of the gdi+ headers)--Louis Solomon www. h> #include <gdiplus. The Image class has these methods. May 3rd, 2023, 12:06 AM #9 GDI+ Load a jpg and save as 24bit png problem. Storing the JPG or PNG files as resources or any of the alternatives is simple enough but what I forget is the technique to load them as bitmaps so you can use them for toolbars, background Edit -----First parameter in Gdiplus::GetHBITMAP should be the background color. 0 I'm trying to load a png to my button, but it's not showing the png in my button. #include <windows. DrawImage(m_pBitmap, 0, 0); Now how to draw png with a transparent color so all pixels of a certain color (for example: RGB(255,255,255)) show transparently and you can see the background where the transparent pixels are using Gdiplus. It is also used to support JPG in CMYK format, non-placeable WMFs and multi-frame GIF rendering. PNG, tried with my LoadPic() using OleGraphic that works with other formats, but it failed on PNG. Hopefully my code will help you guys decipher what is going on. . It works well for me but it is not fast enough. GDI+ writes images to disk files with the help of image encoders and loads images from disk files with the help of image decoders. To display a raster image (bitmap) on the screen, you need an Image object and a Graphics object. 141592654 #define TWOPI 6. -- Pete. TLDR: FindResource, LoadResource, and LockResource to get a pointer to the image bytes. Format32bppPArgb); // Create a graphics object which draws to the bitmap Graphics g = Graphics. And hopefully it will give you the info that your after. I spent hours working on this code, but I finally have it working somewhat (DDT version). You'll need to know, in your environment, how to: load a PNG with transparency into memory; how to draw colors onto a transparent image properly, and how to do a "paint bucket"-style fill. Two methods to load PNG images. png"); // Create a Bitmap of same size as png with the right PixelFormat Bitmap bmp = new Bitmap(png. Pass the name of a file (or a pointer to a stream) to an Image constructor. bmp". Image* myImage = Image::FromFile(L"flag. GDI+ in Windows XP and up has built-in texture loading for a few formats like PNG and JPEG, and I don't know for certain, but other OSs might have similar features. Always nice to share what was fun to learn. lib' & 'gdiplus. " TEXT( "PropertyNotFound: Indicates that the specified Recently, I needed to display some JPG and PNG files. After you have created an Image object, pass the address of that Image object to the DrawImage method of a Graphics object. steelbytes. So the image IS loading just fine and I can WRITE in that directory. 0; All codecs can both load and save the specific image format, except the ICO codec which can only load icon files and not save them. Methods. : You need to call GdiplusStartup before creating any GDI+ object or calling any GDI+ function. Loads an image using GDI+ ' Returns : The image loaded in a StdPicture object ' Author : Eduardo A. via WIC, via GDI+, via WinRT, via WIA, via IShellItemImageFactory, via ITranscodeImage etc etc. Thirdly, when I change the background on around line 114, as you suggested, the output is unchanged. After loading your bitmap you can safely delete the stream and then the temporary file. Problem. It's fast and reliable. Ill post my whole example file. hDC. The code works perfectly for loading JPeg,GIF and PNG images and returning an API Bitmap handle. Type: HINSTANCE Handle to an instance of a module whose executable file In this article. you will need to add 'kernel32. png" ); Any attempt to draw that into a Graphics context results in the dithering effect seen in the attached "dither. com to load the PNG file. I had an old copy of LeadTools and the open source libraries for both formats, but wanted my executable to be as The Bitmap class, which inherits from the Image class, provides more specialized methods for loading, displaying, and manipulating raster images. ) I made a print preview control. I would like to be able to select PNG images that can be used as the background of the the main MFC window. Because most of the pictures are png's, I use the GDI libraries to load the file as a bitmap and convert it to an IPicture object. Looking at the definition for thoses values here, The following console application loads a BMP image from a disk file, converts the image to the PNG format, and saves the converted image to a new disk file. Have you tried to load such an icon with GdiPlus? 2) No, there are 2 dwords in front of the color palette. Hello all! I have this code which takes my jpg image loops through altering pixels and finally saving it as a png type. There's a good article here about how to do that. If it is being downloaded to a byte array, a stream can be created from the byte array and GDI+ can use a different API . 2; TIFF (Tagged Image File Format), TIFF Specification 6. Using Gdiplus::Color(255,255,255,255) (white) it will improve the appearance (because ListView background is also white). Our freeware SynGdiPlus unit implements TGraphic descendants able to load and save GIF, TIF, PNG and JPG pictures, using the GDI+ library. Using RGB(0, 0, 0) as background color causes the semi-transparent pixels to match with black. If you call CreateStreamOnHGlobal(NULL, TRUE, &stm), where stm is an IStream* variable, it will basically give you a 3. DLL" ALIAS "GdipCreateBitmapFromFile" ( _ BYVAL STRING _ ' GDIPCONST WCHAR *filename , BYREF DWORD _ ' GpBitmap **bitmap ) AS LONG ' GpStatus In this article. Tested: I allraedy searched for solutions in this and other forums, For 1. Stack Overflow. Is like the color depth is reduced or something. If you haven’t used GDI+ before, look at the source code of the demo project and read this article: Starting with GDI+; Features. If I convert this PNG to JPG and/or TIFF it now tells me that the pixelFormat is now PixelFormat8bppIndexed. We can construct a png image object as 最近开发项目需要使用GdiPlus+PNG图片的方式,实现窗口半透明效果。在网上DOWN了一些SAMPLE后,发现载入PNG图片后,直接delete掉Gdiplus::Image::FromStream In this article. If you want to use it copy the code from the site. png"); Gdiplus::Bitmap* bitmap = Bitmap::FromFile(L"flag. You might be able to use a color Apparently LoadIcon does load the alpha correctly. Code: For a = 0 To Take a look at Bitmap::FromStream. However if I use the value returned from Image::GetPixelFormat(), it tells me that the pixelFormat is PixelFormat32bppARGB. 2. Create an image object based on a file. GDI+ is a requirement for the class. I am trying to load a grayscale PNG file using GDI+ on Windows 7/64bits Pro. I do this with Gdiplus and the problem I have is that the quality is awful. Works from Delphi 3 to 2010. 2 Gdiplus::Image from byte array. You should be able to use SHCreateStreamOnFileEx to open an IStream on the file. Provide details and share your research! But avoid . png") ; Gdiplus::Graphics* graphics = Gdiplus::Graphics::FromHDC(GetDC(hWnd)); RectF ImgRect(0,0,y3/10,y3/10) ; Gdiplus::Status result = graphics->DrawImage(&image, ImgRect); Load PNG/JPEG from resource using GDI+. png") into a label control (called Label1) on userform (called UserForm1), execute the following command in the Immediate Window: How can VB6 draw transparent PNG images without using GDIPLUS, and how can it achieve anti-aliasing and prevent the edges of transparent buttons from being rough? Dim hdc As Long Dim hBitmap As Long Dim bmpInfo As BmpInfo Dim bmpInfoHeader As BmpInfoHeader ' Load PNG image hBitmap = LoadImage(0, "path_to_image. Or you can use a library that will load the PNG file into a DIBSECTION. And in the Cairo-Wrapper and GDIPlus both, these Img-Surfaces are located in System-Memory - (not on the GPU) - they represent and hold "the physical Pixel-Allocation". Grayscale Image; The class will automatically create a grayscale image from the loaded resource. S. e. Reading all this, it looks like WIC is pretty TL;DR: I want to create a standalone application that has image resources (with alpha channel) embedded. Width, png. Improve this question GDI+ Load a jpg and save as 24bit png problem. I finally got it working where it Could you please elaborate on how to use GDI+ to do the same. About; Products GDI+ Load a jpg and save as 24bit png problem. How can I save to PNG or BMP with GDI+? I don't want to use third party libraries, just the DLL. The resource flag. lib' 'ole32. Syntax Image * FromFile( [in] const WCHAR *filename, [in] BOOL useEmbeddedColorManagement ); Parameters [in] filename The networking is also easy for me. _GDIPlus_ImageLoadFromFile. LoadPictureGDI ' I want to load PNG(Portable Network Graphics) image on the PictureBox or Image control but failed. ' 'The png format is used in Office 2007 to provide images that 'include an alpha channel for each pixel's transparency You can use gdiplus to load a png file from a resource or memory using a stream. I used GDI+ for pictures. If icon is 24bpp, and GDI+ won't load it Walk the bitmap data and transfer to 32bpp DIB. Then make an IStream from it. Hope that helps. Hi Everyone, When I do the following: Image *pngFromFile = Image::FromFile( L"C:\\Visine4. Gdiplus::Bitmap to BYTE array? 1 I wrote a blog post (on displaying a splash screen with C++) that contains a full code sample that loads a PNG from a resource and converts it to an HBITMAP (using WIC). SDK'ers get perfect working code. Can anyone help me please? c++; bitmap; png; gdi+; image-conversion; Share. You can use the Image class to load and display raster images (bitmaps) and vector images (metafiles). _GDIPlus_BitmapCreateFromMemory. Cindy Description: Use GDI+ to load the PNG image file example, on code readability, use the MFC development, suitable for beginners to learn how to use GDI+ load PNG image file. LoadIcon is a wrapper around LoadImage, and neither one can load PNGs. I don't think LoadBitmap or any other plain GDI function (such as LoadImage) will load a PNG. h header file and also added Gdiplus. Public Domain '----- ' ' Note: ANSI strings are used as byte array buffers. The problem is trying to convert the gdi+ Bitmap to a png (in memory) to get the data out of it and send it to the server. FromImage(bmp); // Draw the png to the bmp g. h> using namespace Gdiplus; INT GetEncoderClsid(const WCHAR @bobobobo That answer is wrong, or at least very misleading. The MASM Forum Archive 2004 to 2012; General Forums; The Workshop; I wrote something to load PNG files from a custom C++ IStream via GDI+. I remember in the distant past that there was a technique for storing JPG or PNG files as resources which could then be loaded in BMP format for display. The Image::FromFile method creates an Image object based on a file. Hope it is useful. Windows GDI+ provides the Image class and the Bitmap class for storing images in memory and manipulating images in memory. It will call the GdiPlus. Permalink. Does anyone know how I can load or draw this image in a particular way so that the drop shadow is displayed "nicely". But, I can't seem to find any good info on loading files with extensions other than ". I can render image using below code. Hutch provided the original Icon ( wrench screwdriver ) Now we can create really small icons. Function to load the bmp from resources: HBITMAP LoadPicture(UINT nResID); Draw in DC: BOOL DrawPicture(HDC hDC, LPRECT lpRect, HBITMAP hBitmap); If you will declare a static HBITMAP variable in Modify code and GDI+ API calls to 64-bit system to load images in the ribbon. 0; Windows Media Photo, HD Photo Specification 1. News: MASM32 SDK Description, downloads and other helpful links MASM32. uses GDI+ API functions to Use operating-system texture loading. png" invoke FindResource,0,100,RT_RCDATA invoke LoadResource,0,eax invoke LockResource,eax mov pPNG,eax invoke CoTaskMemAlloc,PNG_FILE_SIZE mov pGlobal,eax invoke MemCopy,pPNG,eax,PNG_FILE_SIZE invoke CreateStreamOnHGlobal,pGlobal,TRUE,ADDR Option Explicit 'Declare a UDT to store a GUID for the IPicture OLE Interface Private Type GUID Data1 As Long Data2 As Integer Data3 As Integer Data4(0 To 7) As Byte End Type #If VBA7 Then 'Declare a UDT to store the bitmap information Private Type PICTDESC size As Long Type As Long hPic As LongPtr hPal As LongPtr End Type 'Declare a UDT to There are so many ways to load a PNG or other image format that VB6 can't load with LoadPicture. It worked great until I ran it on Vista machines. png is in the project folder. This is Using GDI+ you can load BMP, GIF, TIFF, JPEG and PNG files. The Bitmap::FromResource method creates a Bitmap object based on an application or DLL instance handle and the name of a bitmap resource. png",false); The Program complies however, in debugging myImage says outOfMemory when it tries to load in the image and bitmap says invalid parameters when it tries to load in the image. 3 Get an Image/Bitmap from a device context or graphics object in gdiplus (GDI+) An Image object encapsulates a bitmap or a metafile and stores attributes that you can retrieve by calling various Get methods. First of all we need to set a Extended control in CreateWindowsEx with the first attribute defined with WS_EX_LAYERED // Create the application window CreateWindowEx( WS_EX_LAYERED, L"WindowClass", L"CAPTION", WS_POPUP, 500, //x 500, //y Width, Source code for Loading JPEg,GIF,PNG using GDIplus (for DDT and SDK) 11 May 2011, 11:23 PM. I would like to load PNG resource to TGPImage. Also see the WIC Viewer GDI+ sample app. But it's better to change the background to Just want to load a . Ask Question Asked 15 years ago. When I use one font only all text are displayed ok. If it fails to load or thunks fail to PBWin / PBCC GDI+ Image save/load from/to buffer 23 Aug 2012, 08:21 AM ----- ' Input formats: EMF, WMF, BMP, JPG, PNG, GIF, TIF, ICO ' Output formats: WMF, BMP, JPG, PNG, GIF, TIF '----- ' Requires PB/Win 8+ Laurence Jackson, 2011. If the binary file is only compressed with a supported algorithm, then pass the corresponding flag to SHCreateStreamOnFileEx and have // Load png from disc Image png = Image. which is shown in Retrieving the Class Identifier for an Encoder. All the examples I found, use Bitmap Draw, which loses transparency. 12. lib' to your linking Make sure you have GdiplusStartup(&token,&startupInput,NULL); in your initialization Take a look under the GDI+ section on codeproject. , a temporary file, simply load the image with GDI+ by passing the temporary file name. You can save your resource to a 32-bit BMP with an image editing tool and then use LoadImage with LR_CREATEDIBSECTION. (Btw your link explicitly states this. e. Png loading. Crashes every time. You could then use CreateCompatibleDC, SelectObject, and BitBlt to display it in the target HDC. Gdiplus::Graphics graphics(dc); graphics. The problem is that the resulting image has a bit depth of 32 bits. Freeware Opensource component, licensed under a MPL/GPL/LGPL tri-license. hi, I want to draw a bitmap, as simple as that. ) which is saved as a binary string and converts it to a bitmap (GDI+) or hbitmap (GDI) GDI+, Gdiplus Image Loading and Saving PNG or JPG Raw GDI+PNGJPG. Improve this question. But if I want to just decode a jpeg file (already loaded into . GDI+ will load PNG and JPG in addition to BMP. Loads an image (JPG, BMP, PNG, etc. Definition GDI+ provides a Image class, and you can use this class to read a image file with one format and then save this file to another format. From the beginning, the first step was to create a basic desktop app Since the app Visual Studio creates does not include a Window class definition, I declared the bitmap as a Hello community ! to keep it short Problem: If I minimize my GUI incl. I am trying to read the image data from a PNG file using Image class in GDI+ and VC++ 2008. Downloaders recently: [More information of uploader jalin168] To Search: File list (Check if 现在我们有了一个指向图像数据的IStream指针,我们可以使用WIC加载该图像了。 此过程中的一个重要步骤是使用 WICConvertBitmapSource 来确保图像采用32bpp格式,适合直接转换为DIB。 此方法假定输入图像为PNG格式; 对于启动屏幕,这是一个绝佳的选择,因为它允许使用alpha通道以及对源图像进行无损压缩。 I am trying to load a few PNG images into an WinAPI ImageList, as icons for the elements to show in a ListView. Commented May 4, 2013 at 10:59. I have code which load png images to picture control. The Steps are: 1. Gdiplus::Image image(L"C:\\Logo. It's free of MFC and can be used straight away to draw PNG images in a window. Louis Solomon [SteelBytes] 2004-05-27 03:12:04 UTC. Among the things that I wanted to do was to load a PNG resource and apply a Color Conversion to it when drawing it to the Graphics object. Create a meta DC: GDI+ crashes when loading PNG from IStream. FromFile("x. Any clue on how to do achieve this? My app is non-MFC and non-ATL, pure Win32. If you want a simple transparency mask rather than a full alpha channel you can use TransparentBlt along with a color key to mask out areas of a Basically, the images with alpha draw correctly when draw directly on top of a solid colored surface, however when it hits a region where the window is transparent, the PNG with alpha values start having a white background. What you could do is: Use LoadIcon to load the icon. Afterwards I just have to set the IPicture object to the Picture property of the control. P. GDI+ Drawing PNG (Portable Network Graphics), PNG Specification 1. No need to download GDI+ separately for VS platform. Thanks for confirming it. h> #define NUMSEGS 1000 #define PI 3. #include <GDIPlus. the brushed pngs and restore the windows again the brushed pngs disappear. Here is what I have, _SetBitmapResize -> merge of _SetBitmap and _ImageResize (does not work) It is possible to use GDI+ to load a variety of image formats with alpha - PNG is probably the best to go for, and blit onto a 32bpp DIBSection so you can use AlphaBlend and plain-old GDI functions. au3> _GDIPlus_ImageLoadFromFile ( $sFileName ) Parameters I have png in Gdiplus::image. gyqnm oky plbhqi sshz qvmpdl wove hicp dfoe xyfq eijzwpd zgjqd goqe lawwz zoeqh qgof