Delphi: size an image
$30-5000 USD
Paid on delivery
this should be a simple task in Delphi, but I don't know how to solve it:
I read a JPG from a DLL
var
RStream: TResourceStream;
h :HINST;
begin
h := LoadLibrary(pchar(AddMainPath('[login to view URL]')));
RStream := [login to view URL](h, CurShp, RT_RCDATA);
// now I attach the JPG to a TImage control (because I want to display it on screen)
if assigned(RStream) then
begin
try
[login to view URL](RStream);
[login to view URL]:= Jpeg;
finally
[login to view URL];
end;
end
// now I want to size the TImage so that it will display
// the original JPG full size, something like
[login to view URL]:=375;
[login to view URL]:=134;
// BUT HOW DO I KNOW THE SIZE IN PIXEL OF THE LOADED JPG ?
end;
Please note that the code should work for JPG of any size.
The suggested code must compile in Delphi 5
Project ID: #3534981