Jump to content

Wes64

Newbies
  • Posts

    2
  • Joined

  • Last visited

About Wes64

  • Birthday 01/01/1996

Contact Methods

  • Website URL
    https://wes64.github.io

Profile Information

  • Gender
    Not Telling
  • Location
    United States
  • Interests
    Independant game developer.

Wes64's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. This solution worked wonderfully! It's a shame the windows encoder is poor - I hadn't looked in to that.
  2. The paint.net GIF encoder does not optimize the size of the GIF global color table. The GIF color table is capable of holding 4, 8, 16, 32, 64, 128, and 256 colors as specified by the packed byte in the logical screen descriptor. Paint.net always pads the size of the global color table to 256, meaning that up to 756 bytes are wasted per GIF. I have produced this image using paint.net and attached it as "pdn_encoded.gif" . Here is the image as hex: 47 49 46 38 39 61 10 00 10 00 f7 00 00 00 00 00 00 26 ff ff 00 00 ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2c 00 00 00 00 10 00 10 00 00 08 4f 00 03 08 1c 48 b0 a0 c1 83 06 07 28 5c c8 50 21 c1 86 10 07 3c 1c 20 a0 a2 c5 8a 0e 07 2a bc 78 31 a3 c0 8d 02 00 88 04 80 51 a2 46 8a 21 47 96 9c 58 71 24 49 01 1e 03 80 74 b9 f2 24 47 8b 31 41 de cc 19 91 e1 c4 9e 31 11 0a 1d 3a 30 20 00 3b The packed byte in the logical screen descriptor is f7, meaning the GCT size is going to be 2 << (f7 & 7) == 256. However, the GIF only contains 4 colors: #000000, #0026ff, #ff0000, #ffffff. A more optimal encoding is produced here using python. This is attached as "opt_encoded.gif" . Here is the hex: 47 49 46 38 39 61 10 00 10 00 f1 00 00 00 00 00 00 26 ff ff 00 00 ff ff ff 2c 00 00 00 00 10 00 10 00 00 08 4f 00 03 08 1c 48 b0 a0 c1 83 06 07 28 5c c8 50 21 c1 86 10 07 3c 1c 20 a0 a2 c5 8a 0e 07 2a bc 78 31 a3 c0 8d 02 00 88 04 80 51 a2 46 8a 21 47 96 9c 58 71 24 49 01 1e 03 80 74 b9 f2 24 47 8b 31 41 de cc 19 91 e1 c4 9e 31 11 0a 1d 3a 30 20 00 3b The size of the global color table is now limited to 2 << (f1 & 7) == 4 and space is not wasted. This should be optimized because if one wants to amass just 100 GIF images (i.e. for distribution in a program or game), up to 75kb is wasted, which is a huge issue. Hopefully uploading the images to the forum does not change the bytecode, which is why the hex is posted here. This is occurring with paint.net 4.0.6 on 64-bit Windows 7. EDIT: This occurs both when you create a GIF in paint.net and when you open an existing GIF and save it again (even without making changes).
×
×
  • Create New...