Autor Beitrag
Killi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 299

Win*
D6 Prof
BeitragVerfasst: Mi 05.11.03 10:01 
Hi!

Mache mit einer Webcam viele viele kleine Bildchen die ich auf der Platte speichere - jetzt haben sie aber 550 Kb, kann ich die irgendwie konvertieren zu JPG? Die müsste man doch LOCKER auf 50 Kb bekommen...

_________________
----
Life is hard and then you die
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Mi 05.11.03 10:27 
Hallo

in der Hilfe unter TJpegimage.assign ist ein Beispiel, wie du eine bitmap als jpg abspeicherst.
Mußt dir halt ne liste mit den dateinamen erstellen oder nimmst eine filelistbox etc. und dann die einzelnen bmp einladen und konvertieren.
Wenn du die bilder noch klein haben willst, mußt du halt noch mit compressquality rumexperimentieren

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
Killi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 299

Win*
D6 Prof
BeitragVerfasst: Mi 05.11.03 13:10 
wow, geil - aus 225 kb macht er 4 kb ohne großartigen Qualitätsverlust...THX!!!!!!!

_________________
----
Life is hard and then you die
TimonWorld
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 397



BeitragVerfasst: Fr 07.11.03 18:33 
ich blick da aber nicht mehr durch! Ich will nämlich auch große JPEGs zu keinen JPEGs umwandeln.

Bin ja schließlich erst 13 und muss noch vieeel lernen :wink:
Andreas Pfau
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 997



BeitragVerfasst: Sa 08.11.03 21:36 
Hallo,

respekt - mit 13 zum Coder. Aber jetzt mal im Ersnt: was ist dein konkretes Problem? Du willst 'n JPEG resizen? dann weise es einem Bitmap zu (also praktisch TBitmap.Assign(TJpegImage)), resize das Bitmap, weise das Bitmap wieder dem JPEG zu und speichere das JPEG wieder.

Wie man Bitmas resizt? Am einfachsten mit 2 Bitmaps:
- Bitmap 1 laden (also ausm JPEG)
- Bitmap 2 auffe neue Größe stellen (TBitmap.Width, TBitmap.Height)
- Bitmap2.Canvas.StretchDraw(Bitmap2.Canvas.ClipRect, Bitmap1)
- Nun dann eben halt mal Jpeg.Assign(Bitmap2)

So oder so ähnlich...

_________________
Life is a bad adventure, but the graphic is really good!
masterworld
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 20



BeitragVerfasst: Mo 17.11.03 19:52 
Habe mit 2 verschiedenen Codes aus einem Image das Bild in ein Jpeg konventiert. Das erstellen klappt, jedoch ist die Qualität des erstellten Bildes sher stark verändert. Aus grau wird blau, usw.. Meiner Meinung nach liegt es an den Farben, kann ich diese vorm Speichern festlegen, oder woran könnt es liegen?
Andreas Pfau
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 997



BeitragVerfasst: Mo 17.11.03 21:07 
Hallo,

TJepgImage.Quality (100 = beste Qualität).

_________________
Life is a bad adventure, but the graphic is really good!
masterworld
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 20



BeitragVerfasst: Mo 17.11.03 21:11 
danke für deine Antwort habe das Problem aber gerade gefunden --->

hatte hier den Screenshot als Bmp in ein Image exportiert und vorher nochmal abgesspeichert
ausblenden Quelltext
1:
2:
   //  b.SaveToFile('C:\test.bmp'); <-- fehlerhafte Zeile
  Image1.Picture.Assign(B);