Hi Alin

Here is some code that works.

Bobby


uses
  JPeg

var
  JPG : TJPegImage;
  BMP : TBitMap;
begin
  BMP := TBitMap.Create;
    try
      BMP.PixelFormat     := pf24bit;
        
           <set up BMP>

      SaveDialog1.DefaultExt := '.jpg';
      if SaveDialog1.Execute then
        begin
           if lowercase(ExtractFileExt(SaveDialog1.FileName)) = '.bmp' 
then BMP.SaveToFile(SaveDialog1.FileName)
          else if lowercase(ExtractFileExt(SaveDialog1.FileName)) = 
'.jpg' then
            begin
              JPG := TJPegImage.Create;
              try
                JPG.Assign(BMP);
                JPG.SaveToFile(SaveDialog1.FileName);
              finally
                JPG.Free;
              end;
       end;
    finally
      BMP.Free;
    end;
end;

Alin wrote:
>
> HI guys, im kinda new to this group and i searched the message
> database but could not find an answer to my prob. im trying to send
> jpeg images thru a small client server application. the thing is when
> i save the modified jpeg (ex. grayscale, half size etc.) it saves the
> internal bmp, with the *.jpg but full colors and resolution. if some
> one could give some hints.
> im using BDS delphi but on Win32. thanks
>
> 
> ------------------------------------------------------------------------
>
> Internal Virus Database is out-of-date.
> Checked by AVG Free Edition.
> Version: 7.5.446 / Virus Database: 268.18.18/734 - Release Date: 26/03/2007 
> 14:31
>   


[Non-text portions of this message have been removed]

Reply via email to