Does anyone know a way of rotating an image (jpg or gif) in a TWebBrowser control (using Delphi)
Update
The file would be local.
Update 2 So I guess the question should be how do I rotate an image or pdf.
Does anyone know a way of rotating an image (jpg or gif) in a TWebBrowser control (using Delphi)
Update
The file would be local.
Update 2 So I guess the question should be how do I rotate an image or pdf.
Well if it's on a website (in the TWebBrowser) then you can't rotate it. The best you can do is if the image is on your website you can use PHP/ASP/etc. to load the image, and produce a rotated version of it.
If you have control over the content return in the TWebBrowser it can be done via JavaScript.
Here is an example on JavaScript Image Rotation.
If you want to do it with a TImage there are several options listed in this Q/A.
I guess that you already use this approach to show the HTML content in your TWebBrowser.
Now, instead of JavaScript (as suggested by Robert), you use CSS in the generated HTML document.
I haven't tested this, but you should be able to rotate the image (and other HTML-elements) by using this CSS code (for IE-based browsers):
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
See details at MSDN