timage

Why is TImage rotating my image?

岁酱吖の 提交于 2021-02-07 01:59:28
问题 Writing a mobile application - it's pulling images from a secure website, and shown below (the first image) pulls incorrectly (notice web version vs mobile version), the second image shows correctly on the website, but Delphi TImage is rotating it for some reason and I can't figure out why. Rotate is set to 0 and "Fit" is set on the TImage component. Thoughts? 回答1: Jpeg and Tiff have Exif (Exchangeable image file format) metadata that specify image orientation (among other data). It's not

Delphi - How to correctly register a graphic class since XE8?

て烟熏妆下的殇ゞ 提交于 2021-01-26 23:37:47
问题 I'm writing a Delphi package, which provides a new custom TGraphic object, allowing to read a new image format in VCL components like TImage. I originally developed this package with RAD Studio XE7, and it worked well. However I migrated recently to a newer RAD Studio compiler version, and although my package continues to work properly on that new version, I noticed a strange bug that never appeared before. I have a form with several components, some of them are TImage components. Immediately

Delphi - How to correctly register a graphic class since XE8?

一个人想着一个人 提交于 2021-01-26 23:37:45
问题 I'm writing a Delphi package, which provides a new custom TGraphic object, allowing to read a new image format in VCL components like TImage. I originally developed this package with RAD Studio XE7, and it worked well. However I migrated recently to a newer RAD Studio compiler version, and although my package continues to work properly on that new version, I noticed a strange bug that never appeared before. I have a form with several components, some of them are TImage components. Immediately

Wrong color when using CopyRect to copy from large image to smaller canvas

余生长醉 提交于 2020-06-28 05:23:55
问题 I was writing a function to shrink a source image (JPG file) according to a 170 x 200px picture. The source JPG image was loaded into a TImage (Image1, fixed size of 400 x 400px, stretched to fit with aspect ration maintained), then the user will make a selection rectangle to set the area to copy, and then the image will be copied using CopyRect() onto the destination TImage (Image2). void __fastcall TSizePhotoForm::Button3Click(TObject *Sender) { float scale, base = 400.0f; TRect crect; //

Animated gif in Delphi XE 3 forms [duplicate]

走远了吗. 提交于 2019-12-23 20:05:53
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: How to use Animated Gif in a delphi form I recently updated my version of Delphi 7 to Delphi XE3 . Using Delphi 7, I used a component to put a GIF on a TImage, delphi XE3 already has compatibility with gif's, it is not necessary to install any additional third party components. my question is: when I attach the gif to TImate, it becomes static, shows only the first frame. is there any command for this? like

How to get the current view size for an image in Delphi 2009

霸气de小男生 提交于 2019-12-23 16:53:38
问题 I wish to get the current size for an image being displayed with TImage, this object has the Proportional property set to True and is aligned to Client with main form. So, when resizing the form I wanna get the current size for that image, not canvas size neither real size for that image. Getting the current size I can show what's the percentage for current image size respect to real image size. Thanks in advance 回答1: You can compare Image1.Picture.Width or .Height with Image1.Width or

Does clearing an image by assigning Image1.Picture := nil; cause a memory leak?

旧时模样 提交于 2019-12-22 04:37:25
问题 I have read here http://delphi.about.com/od/adptips2005/qt/cleartimage.htm that a way to clear an image from a TImage is to assign nil to .Picture , like this: Image1.Picture := nil; I just want to be sure... I guess the Image1.Picture.loadFromFile(fileName) will allocate some memory and simply setting it to nil, without freeing the memory, will lead to a memory leak. Am I correct? If this is so, which is the "proper" way to unload and clear an image from a TImage? 回答1: The TImage.Picture

How to load a transparent Image from ImageList?

本秂侑毒 提交于 2019-12-21 03:54:15
问题 I want to load a picture (32 bit-depth, transparent) from a TImageList to an TImage . The standard approach would be ImageList.GetBitmap(Index, Image.Picture.Bitmap); . However the GetBitmap method doesn't work with transparency, so I always get a non-transparent bitmap. 回答1: The workaround is rather simple - ImageList offers another method, GetIcon , which works OK with transparency. Code to load a transparent Image would be: ImageList.GetIcon(Index, Image.Picture.Icon); And don't forget to

Zoom image using delphi

牧云@^-^@ 提交于 2019-12-19 09:58:33
问题 I am working with delphi. I have TImage, to which I assign a bitmap. imgmain.Picture.Bitmap := bmpMain; imgmain.Picture.Bitmap.PixelFormat := pf24bit; imgmain is object of TImage and bmpMain is object of TBitmap I want to zoom my image. I have one trackbar on my form and as I click on trackbar the image should get zoom. What should I do? Thank You. Edit : I found some solution at here It works but it cut my image. 回答1: The code you refer to sets up a transformation from one coordinate space

Zoom image using delphi

主宰稳场 提交于 2019-12-19 09:58:25
问题 I am working with delphi. I have TImage, to which I assign a bitmap. imgmain.Picture.Bitmap := bmpMain; imgmain.Picture.Bitmap.PixelFormat := pf24bit; imgmain is object of TImage and bmpMain is object of TBitmap I want to zoom my image. I have one trackbar on my form and as I click on trackbar the image should get zoom. What should I do? Thank You. Edit : I found some solution at here It works but it cut my image. 回答1: The code you refer to sets up a transformation from one coordinate space