This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: setup.exe opening page graphic


On Aug 22 12:36, Warren Young wrote:
> On 8/20/2011 5:16 AM, Corinna Vinschen wrote:
> >Are GIFs always so low on colors?
> 
> Yes.  GIF is limited to a 256-color palette.  It's a hard technical
> limit of the format, and was one of the driving forces behind the
> PNG development effort.
> 
> Animation makes it worse because all the frames share a single
> palette.  This is why the first frame has green casts in the shadows
> even though, in the renders, frame 0 has no green: there's a fair
> bit of green in the overall animation, so the color quantization
> algorithm included some in the global palette, and that then
> happened to be the closest color when quantizing this particular
> frame's shadows.
> 
> I used ffmpeg to create that GIF animation, but that really isn't
> its fortÃ.  A lot of programmer brain power got thrown at the
> problem of improving GIF animation back in the bad old Web 1.0 days,
> before PNG and Flash took over the world.  Photoshop does a lot
> better:
> 
> 	http://etr-usa.com/cygwin/logo/from-box/animation2.gif
> 
> The color casts are gone, the dithering is gone, and the frame rate
> is fixed.  Also, I went ahead and applied the background masks,
> which as predicted made the animation a lot smaller.

That looks much better, I just don't know how to display it in a dialog.

> animation2.gif is about 1/6 the size of animation.gif, but that's
> still 41% bigger than the MPEG-2 version and twice as big as the
> WMV7.  I think Photoshop's given us as much space savings and made
> as good a use of the limited box of crayons as we can reasonably
> hope for.
> 
> Given that, I'd still prefer that someone decide to take on the
> DirectShow challenge.  I don't think it would be much harder than
> getting a GIF animation to show in setup.exe using only the Windows
> API; I think you'd have to embed IE, which is also a COMmy mess.

Not me, sorry.  I found a way to show a .avi file or a AVI resource in 
the dialog, it's just a couple of lines of code:

  HWND anim = Animate_Create (GetHWND (), IDC_AVI_CTRL,
                              WS_BORDER | WS_CHILD, GetModuleHandle (NULL));
  RECT rc;
  GetWindowRect (GetDlgItem (GetHWND (), IDC_AVI_BOX), &rc);
  POINT pt = { x: rc.left, y: rc.top };
  ScreenToClient (GetHWND (), &pt);
  SetWindowPos (anim, 0, pt.x, pt.y, 150, 260, SWP_NOZORDER | SWP_DRAWFRAME);
  if (Animate_Open (anim, MAKEINTRESOURCE (IDV_ANIM_AVI)))
    {
      ShowWindow (anim, SW_SHOW);
      Animate_Play (anim, 0, -1, 1);
    }
 
But there are two problems:

- For some reason it works fine to run some MSFT-provided AVI, but
  Animate_Open fails for the avi file you sent to this list a few
  days ago.

- The AVI resource is twice as big as the rest of setup.exe.

So I'd still love to see a still with a beveled, less glossy C, if
that's ok with you...


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]