Jump to content

I Like Pi

Members
  • Posts

    184
  • Joined

  • Last visited

Posts posted by I Like Pi

  1. GIF does not support partial transparency (called alpha channel). JPEG does not support transparency at all.

    Images saved as GIF usually beat PNG because they always use a palette of 256 colors (lossy compression), while PNG are usually saved with four full channels (RGBA, 32 bits/pixel) because this format is always lossless. However, PNGs usually beat GIFs if properly saved in palette mode (8 bits/pixel). PNG also supports RGB (24 bits/pixel) , grayscale (8 bits per pixel), and grayscale+alpha (16 bits/pixel) modes. The amount of bits used per pixel can be reduced by lowering the bit depth.

    Summary: A PNG with quality identical to a GIF will usually be smaller if saved in the right color mode.

  2. Your effect seems to shift the image a little to the right. Upon examination of your code I found

    for (int j = y - 1; (j <= y + 1); j++)
    for (int i = x - 1; **(i < x + 1)**; i++)

    which I think should be (i <= x + 1).

    It would also be nice if you added a slider for the radius (which in your code is the +/-1).

×
×
  • Create New...