Which steps will reproduce the problem?
1. Display some simple Webpage containing an image
2. Use OnBitmapRequest to supply the image to the Component
What is the expected output? What do you see instead?
Expected: the image get's shown in the component
Instead: an "Empty Image"-Icon is shown
Which version of the product are you using? Which compiler version are you
using? On which operating system?
Version HtmlViewer114-r418, Lazarus 1.0.8 on Win 7 x64.
The Problem seems to be sitting in HtmlSubs-Unit, providing it's not the
excpected behaviour. Following Lines 8154, the code is:
else if Assigned(GetBitmap) or Assigned(GetImage) then
begin
GetTheBitmap;
GetTheStream;
end
GetTheBitmap successfully loads the image, GetTheStream doesn't (OnImageRequest
is not set - the function then defaults to LoadImageFromFile, which also fails
of course and returns nil).
Fix (HtmlSubs.pas, Line 8154):
else if Assigned(GetBitmap) or Assigned(GetImage) then
begin
GetTheBitmap;
if not Assigned(Result) then GetTheStream;
end
else
Result := LoadImageFromFile(TheOwner.HtmlExpandFilename(BMName), Transparent, AMask);
Original issue reported on code.google.com by googleco...@21347.de on 20 Aug 2013 at 8:47
Original issue reported on code.google.com by
googleco...@21347.de
on 20 Aug 2013 at 8:47