Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#1

TPNGImage - Maximale Breite = 65535?!

  Alt 12. Mai 2014, 13:44
Hallo,

Habe gerade gemerkt dass die TPNGImage Komponente von Delphi keine Breite/Höhe von mehr als 65535 zulässt. Was ist der Grund dafür? Die Felder im PNG Header für die Breite und Höhe sind 32 Bit groß und auch sonst kommt jedes andere Programm mit dieser PNG-Datei klar.

Delphi-Quellcode:
// Vcl.Imaging.pngimage.pas, Zeile 2137, Delphi XE4:

{The width and height must not be larger than 65535 pixels}
if (IHDRData.Width > High(Word)) or (IHDRData.Height > High(Word)) then
begin
  Result := False;
  Owner.RaiseError(EPNGSizeExceeds, EPNGSizeExceedsText);
  exit;
end {if IHDRData.Width > High(Word)};
Wofür ist diese künstliche (?) Schranke? Kann man das irgendwie umgehen?
Das nervt mich nämlich gerade etwas...
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat