Exception: Cannot assign a TdxPNGImage to a TJPEGImage at 1.873
Code: Select all
procedure GetImage( sLine: string );
var
iPos: integer;
sTmp: string;
begin
iPos := Pos( '"http:', sLine );
if iPos > 0 then begin
sTmp := Copy( sLine, iPos + 1, 99999 );
iPos := Pos( '">', sTmp );
if iPos = 0 then iPos := Pos( 'jpeg', sTmp );
if iPos = 0 then iPos := Pos( '.gif', sTmp );
if iPos = 0 then iPos := Pos( '.png', sTmp );
if iPos > 0 then begin
sTmp := Copy( sTmp, 1, iPos -1 );
sTmp := sys_RegexReplace( sTmp, '(R-150)', [1,'R']);
on_setPicture( sTmp );
on_savePictureEx( true, '00. Front' ); // <-- Error here
end;
end;
end;