From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13487 invoked by alias); 23 Aug 2011 14:15:20 -0000 Received: (qmail 13078 invoked by uid 22791); 23 Aug 2011 14:14:52 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Tue, 23 Aug 2011 14:14:36 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 66C002C00F3; Tue, 23 Aug 2011 16:14:33 +0200 (CEST) Date: Tue, 23 Aug 2011 14:15:00 -0000 From: Corinna Vinschen To: cygwin-apps@cygwin.com Subject: Re: setup.exe opening page graphic Message-ID: <20110823141433.GA13527@calimero.vinschen.de> Reply-To: cygwin-apps@cygwin.com Mail-Followup-To: cygwin-apps@cygwin.com References: <4E498B18.3030405@etr-usa.com> <20110816083536.GH25129@calimero.vinschen.de> <4E4AC4C2.5010307@etr-usa.com> <20110817154643.GE27614@calimero.vinschen.de> <4E4D7F19.9000707@etr-usa.com> <20110819153959.GA13266@calimero.vinschen.de> <4E4EE245.1080704@etr-usa.com> <20110820111627.GK13266@calimero.vinschen.de> <4E52A194.10308@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4E52A194.10308@etr-usa.com> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com X-SW-Source: 2011-08/txt/msg00220.txt.bz2 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