![]() |
Inkompatible Datentypen: Array und TPng_Color
Hallo,
ich benötige Bilder für die Weiterverarbeitung in Spumux Bilder im Format PNG mit maximal 4 Farben. Dafür habe ich mir unter ![]() In der LibPng.pas ist die Procedure
Delphi-Quellcode:
deklariert, welche in der PngImage.pas von der Procedure
procedure png_set_PLTE(png_ptr: PPng_Struct; info_ptr: PPng_Info;
palette: PPng_Color; num_palette: Integer); cdecl; external Lib;
Delphi-Quellcode:
verwendet wird.
procedure TPngImage.SaveToStream(s: TStream);
var png: PPng_Struct; pnginfo: PPng_Info; RowPtrs: PPointer; BitDepth, colorType: integer; pal: array[0..255] of PALETTEENTRY; pngPal: array[0..255] of TPng_Color; num, i: integer; begin ... if ColorType = PNG_COLOR_TYPE_PALETTE then begin num := GetPaletteEntries(Palette, 0, 256, pal); for i := 0 to num-1 do begin pngpal[i].red := pal[i].peRed; pngpal[i].green := pal[i].peGreen; pngpal[i].blue := pal[i].peBlue; end; png_set_PLTE(png, pnginfo, @pngpal, num); end; ... Delphi 7 Personal bringt mir die Fehlermeldung "Inkompatible Dateitypen: 'Array' und 'TPng_Color'. Eine Änderung in der LibPng.pas bringt nichts und die Änderung von "array[0..255] of TPng_Color" auf "TPng_Color" teilweise falsche Farben. |
Re: Inkompatible Datentypen: Array und TPng_Color
Nimm lieber
![]() |
Re: Inkompatible Datentypen: Array und TPng_Color
Danke für den Tipp. Hat sehr gut geklappt. :thumb:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:10 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