Autor Beitrag
Egbert
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 47

Win XP
D4 Prof
BeitragVerfasst: Do 22.01.04 19:41 
Wie wandle ich eine JPEG-Datei in eine BMP-Datei um ?

Moderiert von user profile iconDeCodeGuru: Topic verschoben
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 22.01.04 20:06 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
Var
  jpeg: TJPEGImage;
  bmp: TBitmap;
Begin
  jpeg:= TJPEGImage.Create;
  try
   jpeg.LoadFromFile( filename );
   bmp:= TBitmap.Create;
   try
   bmp.Assign( jpeg );
   bmp.SaveTofile( ChangeFileExt( filename, '.BMP' ));
   finally
   bmp.free
   end;
  finally
   jpeg.free
  end;
end;
Egbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 47

Win XP
D4 Prof
BeitragVerfasst: Do 22.01.04 21:14 
Titel: RE: JPEG in BMP
Danke für die prompte Antwort. Klappt prima.
Egbert
MathiasH
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 699

WinXP, Win98SE, Debian, Win95
D5 Stand, D6 Prof
BeitragVerfasst: Fr 23.01.04 14:42 
weis jemand, ob/wie man dabei die Qualität einstellen kann?, oder so sachen wie erstmal unscharf und dann genu laden

aber das dürfte dann doch ein Fall für ne compo oder Handarbeit sein.....

_________________
"Viel von sich reden, kann auch ein Mittel sein, sich zu verbergen."
Friedrich Nietzsche
Egbert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 47

Win XP
D4 Prof
BeitragVerfasst: Fr 23.01.04 18:25 
ne, kann ich dir auch nicht sagen.
ich wollte gern einen Text in das Bild schreiben. geht aber nur bei kleineren Dateien. vielleicht weiß jemand wie man das hin bekommt.
Egbert
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Fr 23.01.04 18:42 
Hi,


Probier's mal so:

//...
bmp.Assign( jpeg );
jpeg.CompressionQuality:= 75;
//...


wobei
Zitat:
type TJPEGQualityRange = 1..100;
property CompressionQuality: TJPEGQualityRange;