Restored from previous forum. Originally posted by Danilo.
Hello !!
Is the following correct ??
LoadImage() converts all images (.bmp)
automatically to 32 Bit ??
I load images that i saved as 8bit and
24bit .BMP´s, but ImageDepth() returns
32 for every image.
I´m working with ImageList´s and need
to add a new .BMP to the list, so i have
to know the color depth used.
I tried so many things, but it doesnt work.
Anyone knows something about imagelists
and LoadImage() internals ??
Another weird thing:
ImageList_Create returns the same handle
every time i start the program.
Thats weird, because every handle changes
every time, but ImageList_Create returns
1270472 every time i start the application.
I´m really confused...
Thanks,
...Danilo
Edited by - Danilo on 13 January 2002 00:31:21
LoadImage... and ImageLists
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Danilo.
Thanks for the fast answer Fred !!
The ImageList problem is already gone...
I need to specify the Color Depth
for the ImageList.
Is there a way to get the color depth
of the desktop with an easy API call ??
(need it in my Toolbar library)
Thanks,
...Danilo
PS: I added Tooltips and more buttons today
to the Toolbar library.
Need to finish the imagelist stuff before
release.... but it looks very good so far...
(registered PureBasic user)
Thanks for the fast answer Fred !!
The ImageList problem is already gone...
I need to specify the Color Depth
for the ImageList.
Is there a way to get the color depth
of the desktop with an easy API call ??
(need it in my Toolbar library)
Thanks,
...Danilo
PS: I added Tooltips and more buttons today
to the Toolbar library.
Need to finish the imagelist stuff before
release.... but it looks very good so far...
(registered PureBasic user)
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Paul.
I find the BMP's that it saves are incompatable with Photoshop. I need to save to 24bit but they always save to 32bit (cause my desktop is set to 32bit true color)
Any way to be able to specify the color depth when loading or saving?LoadImage convert the Image to your desktop color depth. Fred - AlphaSND
I find the BMP's that it saves are incompatable with Photoshop. I need to save to 24bit but they always save to 32bit (cause my desktop is set to 32bit true color)
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by fred.
Fixed. Now images are save in 24 bit format. 32 bit is not supported, my fault. I tried and it load in photoshop now. Just tell me if it's fine now. Get the updated lib at http://www.purebasic.com/update/Image
Fred - AlphaSND
Fixed. Now images are save in 24 bit format. 32 bit is not supported, my fault. I tried and it load in photoshop now. Just tell me if it's fine now. Get the updated lib at http://www.purebasic.com/update/Image
Fred - AlphaSND
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Danilo.
1.)
But LoadImage is still using the Desktop depth ??
2.)
Is there a way to get the color depth
of the desktop with an easy API call ??
3.)
How to handle a WM_NOTIFY message in PB ??
(and how do i get the value which button
was pressed ??)
Thanks,
...Danilo
(registered PureBasic user)
1.)
But LoadImage is still using the Desktop depth ??
2.)
Is there a way to get the color depth
of the desktop with an easy API call ??
3.)
How to handle a WM_NOTIFY message in PB ??
(and how do i get the value which button
was pressed ??)
Thanks,
...Danilo
(registered PureBasic user)
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by fred.
1.)
But LoadImage is still using the Desktop depth ??
Yes, LoadImage will always load using desktop depth.
2.)
Is there a way to get the color depth
of the desktop with an easy API call ??
Here is a quick example:
3.)
How to handle a WM_NOTIFY message in PB ??
(and how do i get the value which button
was pressed ??)
Use the Callback, it should work.
Fred - AlphaSND
1.)
But LoadImage is still using the Desktop depth ??
Yes, LoadImage will always load using desktop depth.
2.)
Is there a way to get the color depth
of the desktop with an easy API call ??
Here is a quick example:
Code: Select all
Structure BITMAP2
bmType.l
bmWidth.l
bmHeight.l
bmWidthBytes.l
bmPlanes.w
bmBitsPixel.w
bmBits.l
EndStructure
*DC = CreateDC_("DISPLAY", 0, 0, 0)
If *DC
*BMP = CreateCompatibleBitmap_(*DC, 10, 10)
If *BMP
GetObject_(*BMP, SizeOf(BITMAP2), Bitmap.BITMAP2)
MessageRequester("Desktop Depth: ", Str(Bitmap\bmBitsPixel), #MB_ICONINFORMATION)
DeleteObject_(*BMP)
EndIf
DeleteDC_(*DC)
EndIf
How to handle a WM_NOTIFY message in PB ??
(and how do i get the value which button
was pressed ??)
Use the Callback, it should work.
Fred - AlphaSND