Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Animated GIF support, anybody?
Re: Animated GIF support, anybody? [message #27227 is a reply to message #27120] Tue, 06 July 2010 09:29 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Sat, 26 June 2010 12:12

luzr wrote on Sat, 26 June 2010 18:02

koldo wrote on Thu, 24 June 2010 17:27

Very good

Now last disposal method ("Restore to previous") is included in RasterMultiPage Reference demo.

And now is the time for the GIF animation player control. If you tell me the basic class methods I can do it for yourself.




You mean like specialized Ctrl to display GIF animation? Or rather some generic animation player?

Mirek

Yes Smile

Something somebody puts in the layout designer, enter a file name or String with GIF file, and just plays the animation when the window is opened.


No want to spoil the fun, but I think this is way specialized.... and the moment you add this, people will start requiring support for "real" video (divx, xvid, x264). Are your ready for THAT? Smile

That said, encapsulation of those formats would be really really nice.

But without them, animation player should be reserved for examples or bazaar IMO.
Re: Animated GIF support, anybody? [message #27289 is a reply to message #27227] Sun, 11 July 2010 06:44 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
luzr wrote on Tue, 06 July 2010 09:29

koldo wrote on Sat, 26 June 2010 12:12

luzr wrote on Sat, 26 June 2010 18:02

koldo wrote on Thu, 24 June 2010 17:27

Very good

Now last disposal method ("Restore to previous") is included in RasterMultiPage Reference demo.

And now is the time for the GIF animation player control. If you tell me the basic class methods I can do it for yourself.




You mean like specialized Ctrl to display GIF animation? Or rather some generic animation player?

Mirek

Yes Smile

Something somebody puts in the layout designer, enter a file name or String with GIF file, and just plays the animation when the window is opened.


No want to spoil the fun, but I think this is way specialized.... and the moment you add this, people will start requiring support for "real" video (divx, xvid, x264). Are your ready for THAT? Smile

That said, encapsulation of those formats would be really really nice.

But without them, animation player should be reserved for examples or bazaar IMO.


Hello Mirek

I think a GIF animation is not used to display movies, just to show dynamic elements in motion, like an hourglass or a progress bar (remember the foot in Nautilus).

In fact I am working actively in a media player, but believe me, it is really much heavier than a GIF player.

Anyway if GIF animation is not going to be included in CtrlLib I will include it in Bazaar with pleasure Smile.


Best regards
Iñaki
Re: Animated GIF support, anybody? [message #27307 is a reply to message #27289] Sun, 11 July 2010 22:22 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Sun, 11 July 2010 00:44

luzr wrote on Tue, 06 July 2010 09:29



No want to spoil the fun, but I think this is way specialized.... and the moment you add this, people will start requiring support for "real" video (divx, xvid, x264). Are your ready for THAT? Smile

That said, encapsulation of those formats would be really really nice.

But without them, animation player should be reserved for examples or bazaar IMO.


Hello Mirek

I think a GIF animation is not used to display movies, just to show dynamic elements in motion, like an hourglass or a progress bar (remember the foot in Nautilus).



Well, I have only outlined what IMO people will want after you add any kind of player Smile

Quote:


In fact I am working actively in a media player, but believe me, it is really much heavier than a GIF player.



Still, if current Raster interface is good enough for that, creating Raster player would make possible to connect it with streaming video one day... (represented as Raster).

Quote:


Anyway if GIF animation is not going to be included in CtrlLib I will include it in Bazaar with pleasure Smile.


Well, I can include it with uppsrc, but I do not think it is a generic widget for CtrlLib. After all, RichEdit or Report are separate packages as well.

Mirek
Re: Animated GIF support, anybody? [message #28199 is a reply to message #26531] Sun, 22 August 2010 22:43 Go to previous messageGo to next message
klrkt is currently offline  klrkt
Messages: 20
Registered: December 2008
Promising Member
I have UPP 2467, windows 7 and sdk 7.0
I downloaded the above file "gif.7z" and rebuilt all the "ImageView" sample however:
1. Yes now the gif files display
2. BUT they are NOT animated

by NOT animated I mean that ImageView will display the gif file, but the SAME gif file is animated in the browser (IE, FireFox, etc)

For testing purposes you can use any of the "Smiley Shortcut" gifs
I used icon_redface.gif

Is there a newer version of the plugin available?
Re: Animated GIF support, anybody? [message #28200 is a reply to message #28199] Sun, 22 August 2010 23:44 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
klrkt wrote on Sun, 22 August 2010 22:43

I have UPP 2467, windows 7 and sdk 7.0
I downloaded the above file "gif.7z" and rebuilt all the "ImageView" sample however:
1. Yes now the gif files display
2. BUT they are NOT animated

by NOT animated I mean that ImageView will display the gif file, but the SAME gif file is animated in the browser (IE, FireFox, etc)

For testing purposes you can use any of the "Smiley Shortcut" gifs
I used icon_redface.gif

Is there a newer version of the plugin available?

Hello klrkt

I had left this waiting this post to be solved http://www.ultimatepp.org/forum/index.php?t=msg&goto=280 35&

In fact it is not directly related Rolling Eyes

Now plugin/Gif supports animated gifs... but do not play them.

I will post it in few time.


Best regards
Iñaki
Re: Animated GIF support, anybody? [message #28230 is a reply to message #28200] Tue, 24 August 2010 11:49 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Hello klrkt

The class and demo are ready to be uploaded today.

This is an screenshot of the demo in Windows, Linux and Layout Designer.

index.php?t=getfile&id=2747&private=0

The new class is called AnimatedClip.
Is it better RasterPlayer?
  • Attachment: dib.JPG
    (Size: 78.33KB, Downloaded 752 times)


Best regards
Iñaki
Re: Animated GIF support, anybody? [message #28590 is a reply to message #28230] Wed, 08 September 2010 09:11 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Sweet!
Re: Animated GIF support, anybody? [message #28592 is a reply to message #28230] Wed, 08 September 2010 09:19 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

How to get this class? I haven't found it in U++ sources.
Re: Animated GIF support, anybody? [message #28593 is a reply to message #28592] Wed, 08 September 2010 09:20 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Wed, 08 September 2010 03:19

How to get this class? I haven't found it in U++ sources.


Adding it rigth now... Smile

Koldo, is there any example I could put in examples?
Re: Animated GIF support, anybody? [message #28594 is a reply to message #28593] Wed, 08 September 2010 09:23 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Just thinking: Does it really need to be multithreaded?

At least, perhaps it should be possible to us it single-threaded too...
Re: Animated GIF support, anybody? [message #28595 is a reply to message #28593] Wed, 08 September 2010 09:46 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Quote:

Koldo, is there any example I could put in examples?


Yes, here: "upp\reference\AnimatedClip" Smile.


Best regards
Iñaki
Re: Animated GIF support, anybody? [message #28596 is a reply to message #28230] Wed, 08 September 2010 09:47 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Quote:

The new class is called AnimatedClip.
Is it better RasterPlayer?


Best regards
Iñaki
Re: Animated GIF support, anybody? [message #28598 is a reply to message #28594] Wed, 08 September 2010 09:51 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
luzr wrote on Wed, 08 September 2010 09:23

Just thinking: Does it really need to be multithreaded?

At least, perhaps it should be possible to us it single-threaded too...


Yes of course. Using SetTimeCallback(). I can include it.


Best regards
Iñaki
Re: Animated GIF support, anybody? [message #28600 is a reply to message #28598] Wed, 08 September 2010 09:57 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, the interesting question is what is to be the difference.

I believe MT version should be better if the application performs long processing. But not all apps are MT.

Perhaps the player should be able to do both (or we could have 2 players), and in ST be only able to work with in ST mode, in MT in both modes.
Re: Animated GIF support, anybody? [message #28601 is a reply to message #28600] Wed, 08 September 2010 09:59 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
luzr wrote on Wed, 08 September 2010 09:57

Well, the interesting question is what is to be the difference.

I believe MT version should be better if the application performs long processing. But not all apps are MT.

Perhaps the player should be able to do both (or we could have 2 players), and in ST be only able to work with in ST mode, in MT in both modes.

It could be an option, by default ST.


Best regards
Iñaki
Re: Animated GIF support, anybody? [message #28641 is a reply to message #28601] Thu, 09 September 2010 09:08 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Hello

It is done. Now RasterPlayer default is single threaded.

If compiled with GUI MT it is possible to use SetMT(bool) function to set MT or ST.

"Reference/AnimatedClip" demo is uploaded including both modes.

I am really surprised. Both in Linux and Windows, the ST version goes as smooth as the MT version. Perhaps until now I have used MT sometimes it was not necessary. I am reconsidering my point of view about using timers more frequently Smile.

In few days I will upload the doc.


Best regards
Iñaki
Re: Animated GIF support, anybody? [message #28642 is a reply to message #28601] Thu, 09 September 2010 09:09 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

It looks like RasterPlayer package has linking errors:
Linking...
$blitz.obj : error LNK2005: "class Upp::Image __cdecl GetRect(class Upp::Image const &,struct Upp::Rect_<int> const &)" (?GetRect@@YA?AVImage@Upp@@ABV12@
    ABU?$Rect_@H@2@@Z) already defined in RasterPlayer.obj
with MSC9 compiler, if Functions4U is added to project.
This is because GetRect duplicates one from Functions4U.
I've changed function name to GetRectRP and it links fine (quick & dirty).

It would be also great to support gif transparency.

[Updated on: Thu, 09 September 2010 09:12]

Report message to a moderator

Re: Animated GIF support, anybody? [message #28681 is a reply to message #28642] Sat, 11 September 2010 19:57 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Quick & dirty solution for transparent gifs is to change White colors to SColorFace in RasterPlayer.cpp
Re: Animated GIF support, anybody? [message #28685 is a reply to message #28681] Sat, 11 September 2010 21:06 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Mindtraveller wrote on Sat, 11 September 2010 19:57

Quick & dirty solution for transparent gifs is to change White colors to SColorFace in RasterPlayer.cpp

Hello Pavel

Could you include a sample .gif?


Best regards
Iñaki
Re: Animated GIF support, anybody? [message #28686 is a reply to message #28642] Sat, 11 September 2010 21:08 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Mindtraveller wrote on Thu, 09 September 2010 09:09

It looks like RasterPlayer package has linking errors:
Linking...
$blitz.obj : error LNK2005: "class Upp::Image __cdecl GetRect(class Upp::Image const &,struct Upp::Rect_<int> const &)" (?GetRect@@YA?AVImage@Upp@@ABV12@
    ABU?$Rect_@H@2@@Z) already defined in RasterPlayer.obj
with MSC9 compiler, if Functions4U is added to project.
This is because GetRect duplicates one from Functions4U.
I've changed function name to GetRectRP and it links fine (quick & dirty).

It would be also great to support gif transparency.

Hello Pavel

Thank you. Included.

Mirek: Could you include

Image GetRect(const Image& orig, const Rect &r)


(or something equivalent) in Draw?


Best regards
Iñaki
Previous Topic: Linux anti-aliasing fonts problem
Next Topic: TheIde SVN problem in windows 7
Goto Forum:
  


Current Time: Thu Mar 28 10:33:05 CET 2024

Total time taken to generate the page: 0.02519 seconds