How to get all frames of an animated GIF using TWICImage? - image

I'm working with Embarcadero RAD Studio XE7. In this context, I'm interested to use the Windows Imaging Component (WIC) library to read and show the content of an animated GIF image.
I saw that the VCL provides a TWICImage component, which with I'm able to read easily the first frame of my animated GIF. Now I want to implement a timer to loop through all my frames and show them one by one, in order to show the complete GIF animation on my form.
Which properties the TWICImage provides to do that?

So, as the VCL TWICImage component seems strongly limited, and as I cannot reach my goals using it, I decided to write my own wrapper around the WIC library.
For those who would encounter the same difficulty, I also advise you to implement your own wrapper, it is not such a difficult task.
It's a shame for the TWICImage component, but unfortunately it seems to have been sloppy.
Thanks for all the above replies.

Related

Is it possible to pause/resume a gif animation using FFImageLoading in Xamarin?

The question says it all. Upon loading a .gif using either SvgCachedImage or CachedImage it immediately starts playing. I however need to be able to start and stop it according to some logic. Unfortunately, the built in Xamarin Image whilst allowing this takes so way too long to load the 1.2mb .gif that it destroys the user experience.
I have looked through all the properties on CachedImage and SvgCachedImage and cannot find any that may relate to this feature.

Opening an image in TImage from a server

I am working on a huge project using Delphi XE5, the core of the program is to open an image using the TImage component on the application but the image is on a server that is accessed trough the internet. The image that displays depends on the criteria set trough other events or actions from the user. I already have the criteria's code etc in place, I only neet die Image display part..
What other components do I need to use other than TImage component to make this happen and how does one do this? I have been searching for answers for more than a week and couldn't find something that works.
This is also a multi platform application.
Found what I was looking for at FireMonkey iOS RAD Studio XE2 - Display Image on form loaded from URL although its a bit slow, but for now it can do the job just fine.
Well you can load a TBitmapImage or TJPEGImage from a stream and then stick it into your TImage. However, you will need to know the image type before you do this. Here is an example using TJPEGImage: JPEG data-stream to TImage

GUI style for windows Qt application

How can i achieve this kind of look and feel with colored buttons and rounded corners in dialogs for a windows application?
i dont think it can be done using MFC , will wxWidgets or Qt help ? or any other platform?
You can design whatever the look & feel you are pursuing using QSS. Why don't you take a look at Qt Documentation ? There are plenty of examples & guidance available.
Stylesheet Examples
Stylesheet Reference
Stylesheet Syntax
Customizing Qt Widgets Using Stylesheets
But at times, you will need to override a control to achieve your goal. Like in this question. But I think your required look can be achieved via QSS alone.
The easiest and fastest way to achieve the same UI accross different platforms is to implement it in QML with Qt. Unlike widgets that get automatically styled appropriate to the underlying platform style, QML is entirely platform-independent. You could probably style regular widgets with CSS, or even by reimplementing drawing manually with arbitrary UI API, but it will not be nearly as easy.
It is easy to achieve such a look and feel with any GUI framework.
Choose the framework you are most comfortable with, RTFM, roll up your sleeves and get started.
On any framework you will find methods to draw bitmaps of any color and shape and to handle mouse clicks on them. What more do you need?
This is what GUI frameworks DO! They also provide a default set of widgets for the bone lazy and the conventional. You aren't one of those people. are you?

Good client-side Gauge control?

Does anybody know of a good client-side gauge control? I've tried out ComponentArt's AJAX control, but it's client-side feature leaves a little to be desired. I'm not looking for a Silverlight or Flash gauge either. Currently, I'm playing around with Google's Visualization Gauge and it seems to work pretty well. However, I'd like the control to be more skinnable/customizable if possible.
Any recommendations?
assuming you're willing to write for HTML5 browsers...
http://www.digitaldarknet.net/flash/jsgauge.html
Otherwise, make a DIV with a background image that contains another image that you use jQuery to rotate a-la
http://code.google.com/p/jquery-rotate/

How easy is it in DWM to make an 'always on top' thumbnail for an existing window

I really like when you hover over a window in Vista on the taskbar and it gives you a little preview. if it is video it even plays in the thumbnail.
Often I really wish I could 'tear off' this little window and keep it as an 'always on top' thumbnail on my screen. Maybe its a progress bar I'm watching, maybe its a video i want a little tiny preview of.
Isn't this the kind of thing that DWM makes it easy to program. Would this be a simple endeavor to program in nice managed C# - or would i end up getting all bogged down in tricky API stuff?
I am interested in both existing solutions and pointers on how to code something like this.
Sorry for the self-promotion here. :)
Just mentioning there's already an app that allows you to clone every top-level window and keep their preview "always on top": OnTopReplica.
The program is based on the Windows Forms Aero library, a .NET (c#) library that includes some DWM wrappers. No tricky API stuff needed (besides, the API is pretty simple anyway).
A very good preview of how to use this in C#:
http://community.bartdesmet.net/blogs/bart/archive/2006/10/05/4495.aspx
Yes, you can create your own taskbar-like thumbnails. You're going to have to do quite a bit of window handle manipulation though. How it works is basically that you create a child-window in your form that will be the thumbnail. You obtian the window handle of the top-level window you want a thumbnail of using the usual tricks. Then you call a DWM function DWMRegisterThumbnail to associate the two. You don't actually get involved in painting the thumbnail at all - once the windows are associated, the DWM compositing process takes care of painting a thumbnail of the top-level window in your form.
MSDN Documentation

Resources