Autor Beitrag
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Fr 25.07.03 14:10 
Ich habe bei meinem Programm eine Statistik-Anzeige mit Balkendiagrammen eingebaut. Das Diagramm male ich in ein Timage.
Dabei verwende ich nur 4 oder 5 Farben.
Wenn ich das Bild nun speichere, entsteht ein Bitmap mit einer Farbtiefe von 32bit, was eine Bildgröße von bis zu 10MB verursacht, aber ziemlich sinnfrei ist. Gibt es ne Möglichkeit, das ganze als (16 oder 256)-Farben-Bitmap abzuspeichern? Damit die Bilddateien kleiner werden?
Kleiner gehts natürlich auch mit Hilfe von JPEGs, habe das auch implementiert. Mich würde nur mal interessieren, ob Delphi auch Möglichkeiten mitliefert, dass BMPs nicht unnötig groß werden...

_________________
We are, we were and will not be.
maximus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 896

Win XP, Suse 8.1
Delphi 4/7/8 alles prof
BeitragVerfasst: Fr 25.07.03 14:18 
Aber sicher geht es...

jedes bitmap hat die property 'pixelFormat', die du mit folgenden werten füllen kannst:

TPixelFormat = (pfDevice, pf1bit, pf4bit, pf8bit, pf15bit, pf16bit, pf24bit, pf32bit, pfCustom);

_________________
mfg.
mâximôv
Gausi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Fr 25.07.03 15:18 
Danke, genau sowas suchte ich. Klappt wunderbar. Jetzt sind die BMPs nur noch ein Achtel so groß... 4Bit (16 Farben) reichen für meine Zwecke ja aus..

_________________
We are, we were and will not be.
maximus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 896

Win XP, Suse 8.1
Delphi 4/7/8 alles prof
BeitragVerfasst: Fr 25.07.03 20:33 
Zitat:
Die Antwort ist 42, aber wie lautet die Frage?


How many roads must a man go down?

_________________
mfg.
mâximôv