if (aFrameNumber == 1) {    PRInt32 imgWidth; decoder->mImageContainer->GetWidth(&imgWidth); if (aFrameYOffset > 0) { nsRect r(0, 0, imgWidth, aFrameYOffset); decoder->mObserver->OnDataAvailable(nsnull, nsnull, decoder->mImageFrame, &r); } }
int BeginImageFrame(  void*    aClientData,  PRUint32 aFrameNumber,   /* Frame number, 1-n */  PRUint32 aFrameXOffset,  /* X offset in logical screen */  PRUint32 aFrameYOffset,  /* Y offset in logical screen */  PRUint32 aFrameWidth,      PRUint32 aFrameHeight,     GIF_RGB* aTransparencyChromaKey) /* don't have this info yet */{  nsGIFDecoder2* decoder = NS_STATIC_CAST(nsGIFDecoder2*, aClientData);    decoder->mImageFrame = nsnull; // clear out our current frame reference  decoder->mGIFStruct->x_offset = aFrameXOffset;  decoder->mGIFStruct->y_offset = aFrameYOffset;  decoder->mGIFStruct->width = aFrameWidth;  decoder->mGIFStruct->height = aFrameHeight;  return 0;}