Anders
Anders

Reputation: 279

How to calculate data offset in a GIF file

Can anyone explain, how to calculate the data offset?

Here's the example from the website (link below):

(1 <<((0xE6 & 0x07) + 1)) * 3 = 384 bytes.

E6 equals 230 decimal - but how should I read the rest?

Example

Upvotes: 0

Views: 61

Answers (1)

Carl Norum
Carl Norum

Reputation: 224904

  1. & is bitwise AND. 0xE6 & 0x07 is 6.

  2. << is the left-shift operator. x << y equivalent to x× 2y. In this case: 1 << (6 + 1) is 128.

  3. * is the multiplication operator. 3 * 128 is 384.

Upvotes: 1

Related Questions