Keny14 Posted August 27, 2012 Author Share Posted August 27, 2012 Hello,There is a way to make PNG's picture in EO 3.0 ?(example: make the item description's picture).Thank you. ^^ Link to comment Share on other sites More sharing options...
blkcrow Posted August 27, 2012 Share Posted August 27, 2012 EO 3.0 uses DirectX8 witch supports PNGs just change the image file and it should work Link to comment Share on other sites More sharing options...
Keny14 Posted August 27, 2012 Author Share Posted August 27, 2012 > EO 3.0 uses DirectX8 witch supports PNGs just change the image file and it should workWhen i try to select one PNG image i've the error "invalid picture". Link to comment Share on other sites More sharing options...
JohnPony Posted August 27, 2012 Share Posted August 27, 2012 No no ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png)> EO 3.0 uses DirectX8 witch supports PNGs just change the image file and it should workThe graphics engine (D3D8) supports .png as you stated She is trying to make a control a .png format picture.[http://www.xtremevbt…ead.php?t=77960](http://www.xtremevbtalk.com/showthread.php?t=77960)This seems to be a code reference for what you are trying to accomplish. Although i didn't have a look myself, so don't hate if it isn't exactly what you are looking for. Link to comment Share on other sites More sharing options...
Keny14 Posted August 28, 2012 Author Share Posted August 28, 2012 Thank you but i don't know how to use GDI+. All what i want is make the "picitemdescription" in png format. thanks <.< Link to comment Share on other sites More sharing options...
Wilfre Posted August 28, 2012 Share Posted August 28, 2012 VB6, uses the normal GDI in form designing, meaning you can only use .gif, .jpg, and .bmp image formats. Link to comment Share on other sites More sharing options...
Joyce Posted August 28, 2012 Share Posted August 28, 2012 If you want it to work properly with transparency and alpha masking, you'll either need to render it using D3D8 or GDI+, both are done code-wise.. Link to comment Share on other sites More sharing options...
tslusny Posted August 28, 2012 Share Posted August 28, 2012 Eclipse 3.0 is using GDI+ Link to comment Share on other sites More sharing options...
Joyce Posted August 28, 2012 Share Posted August 28, 2012 > Eclipse 3.0 is using GDI+Not inside the IDE though, you'll still need to program the boxes to use PNG files. Link to comment Share on other sites More sharing options...
Keny14 Posted August 28, 2012 Author Share Posted August 28, 2012 > Not inside the IDE though, you'll still need to program the boxes to use PNG files.Can you show me the way to do it please. ^^' thanks Link to comment Share on other sites More sharing options...
JohnPony Posted August 29, 2012 Share Posted August 29, 2012 > Can you show me the way to do it please. ^^' thanksI believe i gave you a code example earlier in the topic which will show you how to do it using GDI+ Link to comment Share on other sites More sharing options...
Godlord Posted August 29, 2012 Share Posted August 29, 2012 I don't see the reason to use GDI+ over GDI in this particular case. Even though the support for alpha-channel images is fairly limited, it does exist within GDI. However, it will be quite the tedious task to actually implement it without a sufficient amount of programming experience, especially in a niche language like Microsoft Visual Basic 6.The first task is to actually be able to load PNG-images. The most general approach to this is to actually use libpng, for which sufficient documentation and code samples are present. Do keep in mind that the majority of these samples will be written in C.Once the code has been written to load PNG-images, you'll be left with an array of bytes that represents the actual image, similar to an uncompressed bitmap, which you can then pass to [CreateBitmap](http://msdn.microsoft.com/en-us/library/dd183485%28v=vs.85%29) or any of the related functions to create an actual GDI bitmap. Here's the tricky part though, as the image contains an alpha channel, and as every channel does consume eight bits, you'll have to specify that every pixel will consume thirty-two bits in total. Normally, GDI will simply ignore this channel for most operations, or even reset it to zero values, so sometimes you do have to be careful.After you've got a GDI bitmap, you can then draw it via the use of [AlphaBlend](http://msdn.microsoft.com/en-us/library/dd183351%28VS.85%29.aspx), or [TransparentBlt](http://msdn.microsoft.com/en-us/library/windows/desktop/dd145141%28v=vs.85%29.aspx). The prior seems to be favoured over the latter though.There should be some articles that cover this entirely, but most of them will make use of C. Ideally, it should also be possible to create a control in Microsoft Visual Basic 6.0 that wraps this up for you, similar to the actual picture controls that Microsoft Visual Basic 6.0 has to offer.Yours faithfullyS.J.R. van Schaik. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now