![]() |
Ich kann nicht gelesen icon zeichnen.
Ich lese ICO aus der Datei manuell in TBitmap. Ich schaffe ihn mit Hilfe CreateDIBSection (masse ich mich TBitmap. Handle) an. Ich verwende die Palette. Aber die Darstellung schwarz.
Da den vollen Kode. Versuchen Sie, Test2.ico zu öffnen. Übrigens arbeitet ausgezeichnet mit 32-bit icons. ![]() Was zu machen? |
Re: Ich kann nicht gelesen icon zeichnen.
Hi,
you seem to have some problems with german language. It´s no problem to write in English, most of the developers here can speak and write English, too. Greetings, Florian |
Re: Ich kann nicht gelesen icon zeichnen.
Thank you, I really used an online translator.
I'm trying to write a class that would read and save icons because Delphi's TIcon doesn't work with 32-bit icons and in all doesn't suit me. I create a HBITMAP using CreateDIBSection so I have a pointer to bitmap data and then I read the bits from the file into the bitmap. To create TBitmap, I assign HBITMAP to TBitmap.Handle. The code works fine with 32-bit icons that have no palette. But then I created an icon with Borland's Image Editor. The icon is 4-bit and has a palette (should have at least). And here come all the problems. When I assign a palette to TBitmap and run the program under Delphi, the system crashes. When I run the program simply under Windows, the bitmap is displayed black or in incorrect colors (depending on iUsage parameters of CreateDIBSection) and even the mask doesn't work correctly also it seem to be read properly (the image of mask is displayed properly). The thing is I've been trying to solve this problem for a long time and still can't. The source code is here (20 Kb). I use Delphi 5. ![]() Try to load Test2.ico and see how the icon is displayed. Could you help me to solve the problem??? |
Re: Ich kann nicht gelesen icon zeichnen.
Hi mihey,
welcome to Delphi-PRAXiS. Have you tried to use Graphics32 (TBitmap32) Library ( ![]() Zitat:
Good translator. Which one is it? |
Re: Ich kann nicht gelesen icon zeichnen.
Zitat:
The thing is that I want to know what is wrong with my code. You know, it's like a question of principle. So much time was killed. Zitat:
![]() |
Re: the same
Oops... the message here was not right, it was my mistake.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:52 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz