ImageAbort Macro

Microchip Graphics Library

Microchip Graphics Library
ImageAbort Macro
C
#define ImageAbort IMG_blAbortImageDecoding = 1;
Overview

This function sets the Image Decoder's Abort flag so that decoding aborts in the next decoding loop.

Returns

None

Side Effects

None

Example
void callback(void);
void main(void)
{
    IMG_FILE pImageFile;
    IMG_vInitialize();
    ImageLoopCallbackRegister(callback);
    pImageFile = IMG_FOPEN("Image.jpg", "r");
    if(pImageFile == NULL)
    {
              <- Error handling ->
    }
    IMG_bFullScreenDecode(pImageFile, IMG_JPEG, NULL, NULL);
    IMG_FCLOSE(pImageFile);
    while(1);
}

void callback(void)
{
    if(<- check for abort condition ->)
    {
        ImageAbort();
    }
}
Microchip Graphics Library Version 3.06.02 - October 15, 2012
Copyright © 2012 Microchip Technology, Inc.  All rights reserved