Autor Beitrag
mtm
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64

Windows 10 Pro 64 Bit
Delphi XE 6
BeitragVerfasst: Mi 17.03.10 17:15 
Hallo zusammen !!!
Bin ganz neu hier und auch noch Anfänger in Delphi. Ich suche nach einer Möglichkeit den Typen einer Grafikdatei (Bitmap, JPeg, PNG ,...) zu erkennen (Dateiendung reicht nicht - könnte ja falsch sein). Ich habe schon eine ganze Weile gesucht und auch schon eine Möglichkeit gefunden (Dateiheader auslesen).
Gibt es denn da schon Fertiges zum runterladen ?
Danke im Voraus
mtm
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 19.03.10 21:12 
Jep. Das Linux-Utility file ;-)

Scherz beiseite: Im Endeffekt bringt es dir ja eh nur was, bekannte Formate erkennen zu können und das macht die VCL für ihr bekannte Formate von Haus auch (auch wenn das Schrottig implementiert ist), man da also besser selber noch mal nachhilft.

Wozu brauchst Du das konkret?

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Fr 19.03.10 22:45 
user profile iconBenBE hat folgendes geschrieben Zum zitierten Posting springen:
Jep. Das Linux-Utility file ;-)

Oder das X-Plattform-Utility trid.

user profile iconBenBE hat folgendes geschrieben Zum zitierten Posting springen:
Im Endeffekt bringt es dir ja eh nur was, bekannte Formate erkennen zu können und das macht die VCL für ihr bekannte Formate von Haus auch

Nur für Dateinamen.

Wenn du GraphicEx vom Herrn Lischke nutzt, bist du besser dran. In selbiger können nämlich die Graphik-Klassen selbst prüfen, nach was die Datei wohl aussieht. So ist dort auch LoadFromStream implementiert, wo man ja nicht zwingend eine Dateierweiterung hat.

user profile iconBenBE hat folgendes geschrieben Zum zitierten Posting springen:
Wozu brauchst Du das konkret?

Ich verwende das im ResourceManager für /Projekt[HTM]/ ;)

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."