Similarly to Chrome, we then use the first sub-rectangle to set the canvas size. Also: add check for too-large GIF dimensions (>MAX_CANVAS_SIZE) Change-Id: Idce55f1e6f6982a8f0e082aac540e16b530e023e