handling CMYK jpeg files in Delphi 7
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to access files that are stored as Jpeg files, is there an easy way to display these image files without performance loss ? 回答1: You can load the JPeg file using an instance of TJPEGImage and then assign it to a TBitmap to display. You find TJPEGImage in unit jpeg. jpeg := TJPEGImage.Create; jpeg.LoadFromFile('filename.jpg'); bitm := TBitmap.Create; bitm.Assign(jpeg); Image1.Height := bitm.Height; Image1.Width := bitm.Width; Image1.Canvas.Draw(0, 0, bitm); Alternatively, this should also work: bitm := TBitmap.Create; bitm.Assign(