What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Animating DP's, not abandoned yet.

Pages: (17): « First « 1 [ 2 ] 3 4 5 6 » Last »
1 votes - 5 average   Animating DP's, not abandoned yet.
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Animating DP's, not abandoned yet.
quote:
Originally posted by lhunath
Right, so I found an easy way to encode a gif in a png.
With imagemagick :
mogrify -comment "@[uri-to-gif]" [uri-to-png]
Then; the produced png is to be set as DP
Afterwards, the other side receives the png, and does this :
identify -format "%c" [uri-to-png] > [uri-to-gif]

Well; something like that anyway.
NO!!! You must not do that!!!

If your serious about all this, I suggest you to read, learn and fully understand the PNG format (although you don't need to know the compression methods for the actual image, you can skip that)

(PNG's consist of "chuncks")
We said that you could add another file to the comment field of a PNG, well it's not THAT easy. First of all a comment field is part of a "iTXt", "tEXt", or "zTXt" chunck (mind the casing!!!). And this can only contain text for the soul purpose of compatibility. So, if you want to incorporate an animated GIF to a PNG, you must create your own type of chunck.

This new chunck must meet certain criteria. For this purpose (adding another image for your plugin to use) it must be:
- private (not public)
- ancillary (not critical)
- safe-to-copy (not unsafe)

Now, the name of a chunck must be 4 bytes long (4 characters), nothing less, nothing more and the casing does matter!!!
To reflect the above chunck criteria, your name must be lowercased-lowercased-uppercased-lowercased.
Also, the name must be one that is not in use already. So if you choose "AMSN" (for nimated-msn-picture or something) it must be "amSn".

Also, the chunck data itself can not exceed 2^31-1 bytes (I thought, I need to look this up again myself). If you need more (not likely as this is 4GB!), you can create two chuncks (with same name, but then you must make your decoder also aware of this of course)

And while you implement all this in your "PNG"-to-"PNG incl. ani-GIF" converter, I suggest you to fill in the comment, software, warning, disclaimer, source, Author fields of a PNG also. (all this for compatibility and information sake)...

Also, note that there are different version of PNG's (1.0, 1.1, 1.2). Your program needs to be able to handle them all!


So you see, implementing another image into PNG is easy if you know how, but you must know the PNG-format by hart. And you must be good at reading/writing fileformats and understand the conventions...

More info can be found on (this must be learned and studied before attempting something):
http://www.libpng.org/pub/png/
http://www.libpng.org/pub/png/spec/


quote:
Originally posted by PaPalemon
Y not make the display pic Display as GIF? so the file will be sent once then it will be animated?
Because for that you need to change the way MSN Messenger actually works. And those changes will be very very huge! It's not doable...

This post was edited on 05-28-2004 at 04:42 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-27-2004 11:49 AM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Animating DP's, not abandoned yet.
quote:
Originally posted by TheBlasphemer
WTF @ CookieRevised,
Compressed text works fine for this purpose!

As for compatibility, comment, copyright, etc are NOT needed for compatibility!

Don't make it more difficult that it is!
Incorporating a GIF in a PNG is easy as hell,
getting MSN to recognize it is the difficult part!
I don't make it more difficult then it is... It sounds more difficult then it is...

Adding the GIF to a comment field of a text chunck is as easy/difficult as adding that gif to a new chunck, there is no difference in adding and the way you program it...

And text-chuncks may not contain other things then text, sure they can contain all kinds of garbage, but this will break the format. Why not do a bit more effort and make it compatible with every possible PNG-editor???? And the compatibility, comment, copyright, etc are indeed not needed for compatibility, I suggested that because your already doing stuff anyway to the format so you can make it even more user-friendly... And filling those fields with info is even more easier...

And don't say/reply with "It works, so it is ok"... That's a lame and stupid thing to say. You should make it the right way, not some half-arsed-it-works-anyway-way...



This post was edited on 08-25-2005 at 09:10 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-27-2004 11:57 AM
Profile PM Find Quote Report
lhunath
Full Member
***

Avatar
.{ Lord Daisy }.

Posts: 343
40 / Male / –
Joined: May 2004
O.P. RE: Animating DP's, not abandoned yet.
Right, I've been on the PNG and libpng sites and have been reading a bit about them; I learned about the chunks stuff etc. After writing a little test program, I noticed that the comment chunk can only contain 2kb of data.

I encoded the gif as base64, put it in the comment chunk and tried to decode it only to notice that part of it was missing. So, CookieRevised do you know why there is a 2kb limit on that chunk ? Has it been preset like this or is it most likely because of the way ImageMagick works ?

quote:
If your serious about all this, I suggest you to read, learn and fully understand the PNG format
Honestly, I first want to see if it's possible at all before progressing to making it nice and the right way. Because if not I'm going to wind up giving up in the complications of it all without seeing a clear goal.

quote:
And while you implement all this in your "PNG"-to-"PNG incl. ani-GIF" converter, I suggest you to fill in the comment, software, warning, disclaimer, source, Author fields of a PNG also. (all this for compatibility and information sake)...
That off course, is something we cannot forget ;) My name and footprint in there =P
It would, by the way, even be nice to use that to add (like on these forums) a small text under the DP, or whatever, nice for extra features.

Now, I know you're right about the fact that what I first suggested was bare ugly, I want to code it all natively because of the simple fact that I feel dizzy using other people's code. It gives me a feeling of lacking control. But I do want to get it all possible in an ugly way first, later there is always time for improvement. Feel free to argue if you think I'm wrong about this.

Any suggestions as to how to continue ? Add a custom chunk to the PNG or think of a way to inject it in other chunks / bypass the size limit ?
{ -[Image: lhunath.gif]- }
05-27-2004 02:14 PM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Animating DP's, not abandoned yet.
quote:
Originally posted by lhunath
Right, I've been on the PNG and libpng sites and have been reading a bit about them; I learned about the chunks stuff etc. After writing a little test program, I noticed that the comment chunk can only contain 2kb of data.

I encoded the gif as base64, put it in the comment chunk and tried to decode it only to notice that part of it was missing. So, CookieRevised do you know why there is a 2kb limit on that chunk ? Has it been preset like this or is it most likely because of the way ImageMagick works ?
There is no limit that I know of (well at least not 2Kb), but then again, it has been a long while since I did something with PNG's and JPEG's. But I'm almost certain that it is ImageMagick.

quote:
Originally posted by lhunath
quote:
If your serious about all this, I suggest you to read, learn and fully understand the PNG format
Honestly, I first want to see if it's possible at all before progressing to making it nice and the right way. Because if not I'm going to wind up giving up in the complications of it all without seeing a clear goal.
And right you are ;) Well, you know it is possible the put a gif into a png, (one way or the other :rolleyes:), so now you need to find out if you can display something on the original DP (hooking?) or use a seperate window or something... Also, you need to find a way to prevent MSN Messenger to reset/resize the image to a "normal" PNG, like the wtbwplugin....

quote:
Originally posted by lhunath
quote:
And while you implement all this in your "PNG"-to-"PNG incl. ani-GIF" converter, I suggest you to fill in the comment, software, warning, disclaimer, source, Author fields of a PNG also. (all this for compatibility and information sake)...
That off course, is something we cannot forget ;) My name and footprint in there =P
It would, by the way, even be nice to use that to add (like on these forums) a small text under the DP, or whatever, nice for extra features.
To add text etc... to the image you can use the same chunck you've created (or create another chunck for that matter). That way, the comment stays the comment, and doesn't become part of the animated gif.

quote:
Originally posted by lhunath
Now, I know you're right about the fact that what I first suggested was bare ugly, I want to code it all natively because of the simple fact that I feel dizzy using other people's code. It gives me a feeling of lacking control. But I do want to get it all possible in an ugly way first, later there is always time for improvement. Feel free to argue if you think I'm wrong about this.
Nope, no arguments from me there ;)

quote:
Originally posted by TheBlasphemer
Now, lets face the facts :P
Who's the uber-programmer in here (apart from Patchou) (a)
It's not because you made some good plugins, that I don't know my stuff either...
;)

This post was edited on 05-27-2004 at 06:52 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-27-2004 02:46 PM
Profile PM Find Quote Report
reisyboy
Elite Member
*****

Avatar
Messenger Oldie ;-)

Posts: 2107
Reputation: 10
36 / Male / –
Joined: May 2002
RE: Animating DP's, not abandoned yet.
Ill just add a small comment it may or may not be useful.

Try looking how the animated emotions work, they are a string of PNG's that then are strung together to animate. This maybe (and i suspect) todo with MSN Messenger and then you may either be able to use this function todo it for u, or you cant and will have to devise you own way. Another thing it maybe as comments as you say in the strings of PNG's to animate and therefore you maybe able to copy it in some way.

Im not sure if what i have said is right but i do know the emotions are strings of still png's so its deffinatly possible :)
Reisyboy: He is the priest to guide us from evil.. which isn’t working… so we call him Frier Tuck
05-27-2004 03:27 PM
Profile E-Mail PM Web Find Quote Report
lhunath
Full Member
***

Avatar
.{ Lord Daisy }.

Posts: 343
40 / Male / –
Joined: May 2004
O.P. RE: Animating DP's, not abandoned yet.
quote:
Originally posted by CookieRevised
so now you need to find out if you can display something on the original DP (hooking?) or use a seperate window or something... Also, you need to find a way to prevent MSN Messenger to reset/resize the image to a "normal" PNG, like the wtbwplugin....
I'll most likely do that by setting the original picture as one of the same size. The original PNG should be the first frame of the GIF, with the GIF's size, and with the functionality of wtbwplug, it would be able to resize the DP area big enough, to then overlay it with the animated gif.
{ -[Image: lhunath.gif]- }
05-27-2004 03:33 PM
Profile E-Mail PM Web Find Quote Report
Guido
Elite Member
*****

Avatar
Design is Safety

Posts: 4566
Reputation: 50
37 / Male / Flag
Joined: Dec 2002
RE: Animating DP's, not abandoned yet.
quote:
Originally posted by reisyboy
Ill just add a small comment it may or may not be useful.

Try looking how the animated emotions work, they are a string of PNG's that then are strung together to animate. This maybe (and i suspect) todo with MSN Messenger and then you may either be able to use this function todo it for u, or you cant and will have to devise you own way. Another thing it maybe as comments as you say in the strings of PNG's to animate and therefore you maybe able to copy it in some way.

Im not sure if what i have said is right but i do know the emotions are strings of still png's so its deffinatly possible :)
Yes, I think using that kind of "animated" PNGs combined with an any-size-dps plugin like the wtbw one would help.

Of course, you now how to make that work :refuck:
05-27-2004 05:36 PM
Profile E-Mail PM Web Find Quote Report
crank
Full Member
***

Avatar
Failed to come back here :(

Posts: 304
Reputation: 17
35 / Male / Flag
Joined: Mar 2004
Status: Away
RE: Animating DP's, not abandoned yet.
quote:
Originally posted by reisyboy

Try looking how the animated emotions work, they are a string of PNG's that then are strung together to animate. This maybe (and i suspect) todo with MSN Messenger and then you may either be able to use this function todo it for u, or you cant and will have to devise you own way. Another thing it maybe as comments as you say in the strings of PNG's to animate and therefore you maybe able to copy it in some way.


That would need some work...
The Animated Emoticons are png strings but they don't work like that.
It's a predefined thing in MSN Messenger that recognices those png's (only the predifined png's) and kinda 'plays' them like a simple movie.
Atleast that's what I would say tough my experience is just wat I learned from skinning. Like the MSN Butterfly or the spinning MSN guys when logging, Those to work that way 2.
I haven't been active here in ages.
If you're wondering who i am, read my reputations. I used to make plugins, skins and spam the IRC channels here back in the good old days before Windows Live.
05-27-2004 06:37 PM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Animating DP's, not abandoned yet.
indeed, the original png would simply show up like a strip of images to people without the plugin. The best part about integrating a image inside a png is that people without the plugin, wouldn't notice a thing and can see the static pngas normal...
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-27-2004 06:54 PM
Profile PM Find Quote Report
lhunath
Full Member
***

Avatar
.{ Lord Daisy }.

Posts: 343
40 / Male / –
Joined: May 2004
O.P. RE: Animating DP's, not abandoned yet.
quote:
Originally posted by CookieRevised
Now, the name of a chunck must be 4 bytes long (4 characters), nothing less, nothing more and the casing does matter!!!
To reflect the above chunck criteria, your name must be lowercased-lowercased-uppercased-lowercased.
code:
    chunk_list - list of chunks affected (a byte string,
                 five bytes per chunk, NULL or '\0' if
                 num_chunks is 0)
I'm supposing you were wrong about the four chars length of a chunk size ?
* lhunath looks around a bit more

Edit:
In the W3C Specs I found this :
code:
4.7.2 Chunk types

There are 18 chunk types defined in this International Standard. Chunk types are four-byte sequences chosen so that they correspond to readable labels when interpreted in the ISO 646.IRV:1991 character set.
Now, can anybody explain to me what the fifth byte in the chunk_list is supposed to mean.. ?

This post was edited on 05-27-2004 at 09:51 PM by lhunath.
{ -[Image: lhunath.gif]- }
05-27-2004 09:10 PM
Profile E-Mail PM Web Find Quote Report
Pages: (17): « First « 1 [ 2 ] 3 4 5 6 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On