U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » U++ Developers corner » Animated GIF support, anybody?
Animated GIF support, anybody? [message #26531] Mon, 10 May 2010 08:13 Go to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
I guess this is a valid request:

http://www.ultimatepp.org/forum/index.php?t=msg&th=2967& amp;start=0&

Well, anybody willing to add animated GIF support to plugin/GIF? Smile

Mirek
Re: Animated GIF support, anybody? [message #26965 is a reply to message #26531] Tue, 15 June 2010 15:33 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
luzr wrote on Mon, 10 May 2010 08:13

I guess this is a valid request:

http://www.ultimatepp.org/forum/index.php?t=msg&th=2967& amp; amp;start=0&

Well, anybody willing to add animated GIF support to plugin/GIF? Smile

Mirek

Hello Mirek

This is very easy. The code is there.

Just tell how you want the interface for:
- loading images: How to cross through StreamRaster-Raster-GIFRaster
- showing them.



Best regards
Iñaki
Re: Animated GIF support, anybody? [message #26966 is a reply to message #26965] Tue, 15 June 2010 19:19 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
koldo wrote on Tue, 15 June 2010 09:33

luzr wrote on Mon, 10 May 2010 08:13

I guess this is a valid request:

http://www.ultimatepp.org/forum/index.php?t=msg&th=2967& amp; amp; amp;start=0&

Well, anybody willing to add animated GIF support to plugin/GIF? Smile

Mirek

Hello Mirek

This is very easy. The code is there.

Just tell how you want the interface for:
- loading images: How to cross through StreamRaster-Raster-GIFRaster
- showing them.




Actually, interfaces are already there for Raster:

class Raster {
....
public:
	virtual void    SeekPage(int page);
	virtual int     GetActivePage() const;
	virtual int     GetPageCount();



RasterEncoder might need one or two new virtual methods.

Mirek
Re: Animated GIF support, anybody? [message #26969 is a reply to message #26966] Tue, 15 June 2010 23:52 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
luzr wrote on Tue, 15 June 2010 19:19

koldo wrote on Tue, 15 June 2010 09:33

luzr wrote on Mon, 10 May 2010 08:13

I guess this is a valid request:

http://www.ultimatepp.org/forum/index.php?t=msg&th=2967& amp; amp; amp; amp; amp;start=0&

Well, anybody willing to add animated GIF support to plugin/GIF? Smile

Mirek

Hello Mirek

This is very easy. The code is there.

Just tell how you want the interface for:
- loading images: How to cross through StreamRaster-Raster-GIFRaster
- showing them.




Actually, interfaces are already there for Raster:

class Raster {
....
public:
	virtual void    SeekPage(int page);
	virtual int     GetActivePage() const;
	virtual int     GetPageCount();



RasterEncoder might need one or two new virtual methods.

Mirek

Hello Mirek

I imagine you say the frame rate (time between frames per every frame) or the aspect ratio Smile.

Meanwhile please think about visualization interface.


Best regards
Iñaki

[Updated on: Tue, 15 June 2010 23:59]

Report message to a moderator

Re: Animated GIF support, anybody? [message #26979 is a reply to message #26969] Wed, 16 June 2010 14:15 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Hello Mirek

Here I enclose you the files changed.

Just for testing (do not consider it a serious player Smile ) I have used the next simple code. It shows 100 frames repeating them if the gif have less frames. Delay is considered but aspect is not.

	FileIn in(fileName);
	One<StreamRaster> raster = StreamRaster::OpenAny(in);
	int ind = 0;
	for (int i = 0; i < 100; ++i) {
		raster->SeekPage(ind);
		image = raster->GetImage();
		
		Refresh();
		Ctrl::ProcessEvents();

		int delay = raster->GetPageDelay(ind);
		if (delay <= 0)
			Sleep(100);
		else
			Sleep(delay*10);
		
		if (ind < raster->GetPageCount()-1)
			ind++;
		else
			ind = 0;				
	}


I have added two new virtual functions:

virtual int GetPageAspect(int n);
virtual int GetPageDelay(int n); 



In GIF format it is defined a delay per frame, but an aspect ratio for all frame set, so a GetAspect(void) version would be valid.

  • Attachment: GifFiles.7z
    (Size: 10.27KB, Downloaded 374 times)


Best regards
Iñaki
Re: Animated GIF support, anybody? [message #26991 is a reply to message #26979] Fri, 18 June 2010 10:22 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Wonderful, thank you.

But what about Encoder? Smile

Also, maybe you could send me complete testing package so that we can add reference example... (Or you can do it yourself).

Mirek

[Updated on: Fri, 18 June 2010 10:23]

Report message to a moderator

Re: Animated GIF support, anybody? [message #26992 is a reply to message #26991] Fri, 18 June 2010 11:11 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
luzr wrote on Fri, 18 June 2010 10:22

Wonderful, thank you.

But what about Encoder? Smile

Also, maybe you could send me complete testing package so that we can add reference example... (Or you can do it yourself).

Mirek

Hello Mirek

Before doing the encoder I would prefer to prepare the player class Smile. I think it has higher priority.

Anyway do you want to include a Reference example for multipage decoding?. This example (as code updated before) would serve for .GIF and for :TIFF files too.


Best regards
Iñaki
Re: Animated GIF support, anybody? [message #27004 is a reply to message #26992] Sun, 20 June 2010 23:22 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Quoting Koldo's PM:

Quote:


- Our Gif support does not work well for all samples I have tested from here (http://www.animatedgif.net/).
I have tested bad files with previous U++ GIF support and the problems also appear, so they are not caused by last changes.

Do you know what was the source of our original GIF code to try to get an update or try to now where the problem comes?

Re: Animated GIF support, anybody? [message #27005 is a reply to message #27004] Sun, 20 June 2010 23:26 Go to previous messageGo to next message
rylek is currently offline  rylek
Messages: 79
Registered: November 2005
Member
Hi Koldo!

Mirek asked me to have a look at the malfunctioning GIF's. Can you please send me links to some GIF's from the web page you mentioned which don't work?

Thanks

Tomas
Re: Animated GIF support, anybody? [message #27006 is a reply to message #27005] Mon, 21 June 2010 00:24 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1796
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi,

I just tested the reference player with this image, which is one of the nonworking ones. I came to conclusion that the troubles come from the fact that it is optimized. (Some of the subimages have smaller size).

If I changed the layer sizes in gimp and resaved, it works almost fine, it only changes the disposal method. That could be probably fixed too.

The changed file is attached for reference...

Honza
Re: Animated GIF support, anybody? [message #27007 is a reply to message #27006] Mon, 21 June 2010 09:16 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Hello Tomas

Some days ago I hacked your code to decode animated GIFs.

It works well for some files but there are problems with other.

I checked some of the failed files with old code and the problem appeared.

Honza (dolik.rce) has detected one source of the failure. The Gif he includes has different image size per page (subimage). I think he has got the problem as it happens the same with other failed files:

- the images seems scrambled
- however, the images colors look right
- there is at least one image right

It seems to indicate that the colors are decoded right, but some of the pages begin and end are taken wrong.

I have tried to implement this change in subimage size but results do not improve.

Could you do/fix the code or give me some info about the inner details of GIF format you used to do your code?


Best regards
Iñaki
Re: Animated GIF support, anybody? [message #27010 is a reply to message #27007] Mon, 21 June 2010 09:38 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1796
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Koldo & Tomas,

I had a quick look at the GIF format spec. The relevant part is paragraph 20. The data block described there should be loaded in GifLocalInfo::Load(). The code seems that it is already doing that.

But since the picture loaded is distorted, it seems that this information (GifLocalInfo::{x,y,width,height}) is not treated in GifProcessor::LoadSubimage(). It only checks if the values are sane. I guess it should also pad the actual image with transparent frame according to the x,y,width and height.

Sorry I don't dig into it myself, but my finals are coming tommorow Wink But expect my helping in few days, if it is not finished by then.

Honza
Re: Animated GIF support, anybody? [message #27011 is a reply to message #27010] Mon, 21 June 2010 10:53 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
dolik.rce wrote on Mon, 21 June 2010 09:38

Hi Koldo & Tomas,

I had a quick look at the GIF format spec. The relevant part is paragraph 20. The data block described there should be loaded in GifLocalInfo::Load(). The code seems that it is already doing that.

But since the picture loaded is distorted, it seems that this information (GifLocalInfo::{x,y,width,height}) is not treated in GifProcessor::LoadSubimage(). It only checks if the values are sane. I guess it should also pad the actual image with transparent frame according to the x,y,width and height.

Sorry I don't dig into it myself, but my finals are coming tommorow Wink But expect my helping in few days, if it is not finished by then.

Honza

Agree. Working on that now.


Best regards
Iñaki
Re: Animated GIF support, anybody? [message #27013 is a reply to message #27011] Mon, 21 June 2010 11:35 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Problem found and solved! Now failed Gifs are opened well Smile

The problem came from animated GIFs have different bitmaps with different sizes and locations, so lets say subimage 3 is the mix of 0, 1, 2 and 3 overlapped in their locations!!

This is an extreme sample of it Smile

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

Thank you Honza.
  • Attachment: AG00052_.GIF
    (Size: 7.51KB, Downloaded 1390 times)


Best regards
Iñaki
Re: Animated GIF support, anybody? [message #27018 is a reply to message #27013] Mon, 21 June 2010 16:13 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
And thank you Tomáš.

You did the 95% of the job Smile.


Best regards
Iñaki
Re: Animated GIF support, anybody? [message #27030 is a reply to message #27018] Tue, 22 June 2010 00:24 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
Hello Mirek

Included new code for Raster and plugin/Gif.

Virtual funcions added are:
- Rect GetPageRect(int n). Gets the subimage Rect
- int GetPageDisposal(int n). Gets the way the subimage has to be handled by the renderer

Reference/RasterMultiPage example has been uploaded covering these changes.
  • Attachment: Gif.7z
    (Size: 8.93KB, Downloaded 352 times)


Best regards
Iñaki

[Updated on: Tue, 22 June 2010 00:25]

Report message to a moderator

Re: Animated GIF support, anybody? [message #27080 is a reply to message #27030] Thu, 24 June 2010 20:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Thank you.
Re: Animated GIF support, anybody? [message #27083 is a reply to message #27080] Thu, 24 June 2010 23:27 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
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.



Best regards
Iñaki
Re: Animated GIF support, anybody? [message #27118 is a reply to message #27083] Sat, 26 June 2010 18:02 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
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
Re: Animated GIF support, anybody? [message #27120 is a reply to message #27118] Sat, 26 June 2010 18:12 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3458
Registered: August 2008
Senior Veteran
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.


Best regards
Iñaki
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: 14290
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: 3458
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: 14290
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: 3458
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: 3458
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 1042 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: 14290
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: 14290
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: 14290
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: 3458
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: 3458
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: 3458
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: 14290
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: 3458
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: 3458
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: 3458
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: 3458
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: Tue Apr 28 13:36:32 GMT+2 2026

Total time taken to generate the page: 0.01237 seconds