AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi Ich kann nicht gelesen icon zeichnen.
Thema durchsuchen
Ansicht
Themen-Optionen

Ich kann nicht gelesen icon zeichnen.

Ein Thema von mihey · begonnen am 6. Jan 2005 · letzter Beitrag vom 7. Jan 2005
Antwort Antwort
mihey

Registriert seit: 6. Jan 2005
4 Beiträge
 
#1

Ich kann nicht gelesen icon zeichnen.

  Alt 6. Jan 2005, 22:49
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.

http://www.hot.ee/mvps18/IconLoad.zip

Was zu machen?
  Mit Zitat antworten Zitat
Benutzerbild von flomei
flomei

Registriert seit: 17. Jan 2003
Ort: Schieder-Schwalenberg
2.094 Beiträge
 
Delphi 2005 Personal
 
#2

Re: Ich kann nicht gelesen icon zeichnen.

  Alt 6. Jan 2005, 22:54
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
Florian Meier
... ist raus.
Vielen Dank für die Zeit mit euch!
http://www.flomei.de -- http://www.md5hash.de
  Mit Zitat antworten Zitat
mihey

Registriert seit: 6. Jan 2005
4 Beiträge
 
#3

Re: Ich kann nicht gelesen icon zeichnen.

  Alt 7. Jan 2005, 12:20
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.

http://www.hot.ee/mvps18/IconLoad.zip

Try to load Test2.ico and see how the icon is displayed.

Could you help me to solve the problem???
  Mit Zitat antworten Zitat
Christian Seehase
(Co-Admin)

Registriert seit: 29. Mai 2002
Ort: Hamburg
11.105 Beiträge
 
Delphi 11 Alexandria
 
#4

Re: Ich kann nicht gelesen icon zeichnen.

  Alt 7. Jan 2005, 12:30
Hi mihey,

welcome to Delphi-PRAXiS.

Have you tried to use Graphics32 (TBitmap32) Library (www.g32.org) to solve your problem?

Zitat von mihey:
I really used an online translator.


Good translator. Which one is it?
Tschüss Chris
Die drei Feinde des Programmierers: Sonne, Frischluft und dieses unerträgliche Gebrüll der Vögel.
Der Klügere gibt solange nach bis er der Dumme ist
  Mit Zitat antworten Zitat
mihey

Registriert seit: 6. Jan 2005
4 Beiträge
 
#5

Re: Ich kann nicht gelesen icon zeichnen.

  Alt 7. Jan 2005, 13:15
Zitat:
Have you tried to use Graphics32 (TBitmap32) Library (www.g32.org) to solve your problem?
I thought of that and decided it won't do. I have no problems displaying pf32bit TBitmap as I want. If I use TBitmap32, I will have to convert every icon bitmap data into 32-bit bitmap data, that means much work with palette. But the main problem will raise when I try to save a 4-bit icon, for example, from 32-bit bitmap. If a TBitmap32 was modified, I will have to check if the number of colors doesn't exceed the limits of 4-bits.

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:
Good translator. Which one is it?
It's http://www.paralink.com , but I used translation from Russian into German.
  Mit Zitat antworten Zitat
mihey

Registriert seit: 6. Jan 2005
4 Beiträge
 
#6

Re: the same

  Alt 7. Jan 2005, 15:54
Oops... the message here was not right, it was my mistake.
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:41 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz