Προς το περιεχόμενο

Delphi 4/5/6 Help!


epizhmios

Προτεινόμενες αναρτήσεις

Δημοσ.

Kserei kaneis pws mporei na ginei concert mia eikona bmp se jpg. Exw ena component to JPEG alla de 8elw na xrhsimopoihsw components giati auksanoun to size. Epishs an kapoios me boh8ouse na brw to source tou component, 8a to ektimousa..... tongue.gif" border="0 tongue.gif" border="0 tongue.gif" border="0 tongue.gif" border="0

Δημοσ.

mallon ennoeis convert apo bmp se jpg?<BR>filarako ego oles tis images tis kano bmp ean einai na tis balo se programma (gia logous simbatotitas).<P>xreisimopoio to photoshop (5.5 alla den paizei rolo) kai otan exo teleiosei me tin eikona pigaino Image-Mode-> kai dialego Indexed Color . ekei synithos dialego 256 xromata i Exact, meta gia na tin soso pao File-Save a Copy kai tin sono san bmp. alles fores paizo me ton arithmo ton xrommaton kai bazo dither gia na min xanei poly, kai ean den exei apoklisi tin sono.<P>meta den tin fortono sto programma alla se res arxeio pou to prostheto ston kodika, kai auto giati ean to fortoso sto programma kateutheian to arxeio tis formas (dfm) ginetai poly megalo se sxesi me to an to ballo se res arxeio. sto arxeio formas to metatrepei se text eno sto res einai kathara binary.<P>meta ftiaxno ena TBitmap runtime kai fortono tin eikona me tin procedure LoadFromResourceName, ta ypoloipa pou mporeis na kaneis einai apoira. kai to i moni unit pou tha exeis fortosei gia na deixei tin eikano tha einai i graphics.<P>px opos leei kai i help<P><BLOCKQUOTE><font size="1" face="Verdana, Helvetica, sans-serif">code:</font><HR><pre><BR>procedure TForm1.Button1Click(Sender: TObject);<BR>var<BR> BitMap1 : TBitMap;<BR>begin<BR> BitMap1 := TBitMap.Create;<BR> try<BR> BitMap1.LoadFromResourceName(HInstance,'THEBITMAP');<BR> Canvas.Draw(12,12,BitMap1);<BR> finally<BR> BitMap1.Free;<BR> end;<BR>end;<BR></pre><HR></BLOCKQUOTE><P><BR>tin unit jpeg pou mallon xreisimopoieis tin periexei i delphi ston katalogo borland\delphiX\lib (opou X o arithmos tis version) alla einai se dcu (delphi compiled unit) morfi kai den mporeis na deis ton kodika (isos ean agorazes tin RTL [Runtime Library] apo tin borland, alla den xero ean tin poulane :P)<P>elpizo na katalabaineis pano kato ti leo.

Δημοσ.

oxi file den katalaves... den 8elw na balw eikona sto programa, apla :<P>ftiaxnw ena remote admninistration tool (y3knetwork.org) kai h nea ekdosh 8a apo8ukeuei mia ikona bmp ston skliro tou server kai meta 8a prepei na th stilei ston client. omws gia na ginei auto grhgora, prepei h ikona na metatrapei se morfh JPG giati BMP ine kapou sto 1-2mb.<P>any idea?

Δημοσ.

dokimase<P><BLOCKQUOTE><font size="1" face="Verdana, Helvetica, sans-serif">code:</font><HR><pre><BR>uses JPEG;<P>procedure TForm1.BitBtn1Click(Sender: TObject);<BR>var Bitmap : TBitmap;<BR> JpegImg: TJpegImage;<BR>begin<BR> Bitmap := TBitmap.Create;<BR> try<BR> Bitmap.LoadFromFile('c:\bmppic.bmp');<BR> JpegImg := TJpegImage.Create;<BR> try<BR> JpegImg.Assign(Bitmap);<BR> JpegImg.SaveToFile('c:\jpgpic.jpg');<BR> finally<BR> JpegImg.Free<BR> end;<BR> finally<BR> Bitmap.Free<BR> end;<BR>end;<P></pre><HR></BLOCKQUOTE><P>kai xoris na xreisimopoiei skliro (tha prepei na iparxei kapoia image gia na leitourgisei):<P><BLOCKQUOTE><font size="1" face="Verdana, Helvetica, sans-serif">code:</font><HR><pre><BR>uses JPEG;<P>function FCovertImg(_bitmap: TBitmap): TJpegImage;<BR>var JpegImg: TJpegImage;<BR>begin<BR> JpegImg := TJpegImage.Create;<BR> try<BR> JpegImg.Assign(_bitmap);<BR> result := JpegImg;<BR> finally<BR> JpegImg.Free<BR> end;<BR>end;<BR></pre><HR></BLOCKQUOTE><P>mporeis na allaxeis tin sympiesi meso CompressionQuality, kalo tha itan an koitaxeis tin boitheia gia perissoteres info.<P>ean trogesai gia to megethos tou programmatos mporeis na xreisimopoieisis kapoion exe-packer.<P>episis ean thes na xekiniseis apo tin arxi mporo na sou steilo to:<BR>Learn Graphics File Programming with Delphi 3 (by Derek A. Benner - ISBN 155622558x)<BR>to opoio biblio sou analyei ta pio gnosta format gia images kai pos na ta diaxeiristeis meso delphi.<p>[ 24-08-2001: Message edited by: sh4dow ]

Αρχειοθετημένο

Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.

  • Δημιουργία νέου...