• Robert Sprowson's avatar
    Reorder evaluation of whether to use built in JPEG decode or djpeg. · cb1cd3b7
    Robert Sprowson authored
    Before, the candidate JPEG file was prescanned and a decision made as to whether that was too hard for CFSIjpeg to do or not. This lead to duplicated tests when (a little later on at 'WHEN 3700:') the file is prescanned anyway - plus this implictly encoded the capabilities of CFSIjpeg into the BASIC code.
    Now, the CFSIjpeg binary is loaded at the first detection of a JPEG file and the scan done up front using its built in routine.
    This isn't a performance penalty since the area (jpeg%) was never freed anyway so there is now no need to load it later, which has the additional benefit that it is now possible to detect CFSIjpeg missing and fall back to djpeg rather than reporting an error.
    Fixed an 'end of file' error spotted in testing when djpeg fails to produce an output it does actually create a scrap file of zero length which is now checked for too.
    Version 1.30. Tagged as 'ChangeFSI-1_30'