PNG cover error

Report a bug or a problem.
Post Reply
atagal
Newbie
Newbie
Posts: 34
Joined: Tue Oct 26, 2010 12:08 am

PNG cover error

Post by atagal »

Error when PNG cover:

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;
function on_SavePicture( bSilent: boolean ): string;

Post Reply