What happened to GIF?

Talk about anything
User avatar
Drugwash
Posts: 560
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

What happened to GIF?

24 Apr 2018, 06:57

This is more or less a follow up from another topic where I happened to ask an off-topic question which evolved. I wanted to know of a tool that could capture screen activity to animated GIF images, that could then be posted as feedback/presentation/whatever, but that would not suffer from a certain undesired effect. This undesired effect happens in one certain image viewing application, the most handy to me. So, here we go…

burque505 wrote:I use Screen2Gif, it's free, and updated often.

Drugwash wrote:[…] I've checked and it's still in a weird format that my Total Commander plug-in (Imagine by Chun Sejin) can't render correctly so that application is of no use to me (more so when my system doesn't meet its requirements) […]

burque505 wrote:[…] sorry that one didn't work, try Licecap (got this tip from BoBo). It's not as easy to use, but I bet it's more lightweight.

Drugwash wrote:Thank you, I had already tried a few capture applications some time ago, Licecap included, but they all create the same type of GIFs. Dunno what the problem may be but rendering is horrible, black areas all over the place.

tidbit wrote:the rendering issue is probably due to transparency. some programs have an option to only draw the different pixels between frames. so less pixels = smaller file size. […] also, it's probably an issue with your image viewer for not handling the transparency correctly. Or maybe sometimes the program screws up, not sure.

Thank you both. It definitely is a problem with Imagine since FastStone Image Viewer does render the respective animated GIFs correctly. However, years ago I had never encountered an animated GIF that would play erroneously even in older versions of the Imagine plug-in/application. Everything was just working. To me it's much easier to view an image in Total Commander's Lister (where Imagine kicks in) than in full-fledged FS Image Viewer, but this weird issue is quite disturbing. Oh and tidbit: I have tried with both transparency enabled and disabled in Licecap - no change whatsoever.

I've also noticed that large animations made by the same recent tools would sometimes drain all the system resources (RAM, page file and CPU) if open in the QtWeb browser which I've been using for some time instead of the much more resource-hungry Pale Moon stuffed with all kinds of extensions. On a single-core 1.8GHZ CPU with only 1.5GB of PC133 SDRAM the choice of applications is essential.

So, what the hell happened to the GIF format in the mean time? Can someone shed some light on this? And is there an older (XP-compatible, maybe Win9x-compatible too) tool that could capture screen areas and build old-style GIF animations - whatever that style may be?

As for AHK, it now has arrays, objects, classes and all kinds of bells and whistles but still - after 14 years of development! - cannot natively render an animated GIF in a GUI. Imagine :roll: that!

Here's a sample of such animation (browser will probably render it correctly):
test0.gif
test0.gif (29.48 KiB) Viewed 583 times


and here's how a frame looks like in Imagine (all but first look like that):
test0_Frame_002.png
test0_Frame_002.png (2.74 KiB) Viewed 583 times
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
burque505
Posts: 446
Joined: 22 Jan 2017, 19:37

Re: What happened to GIF?

24 Apr 2018, 11:20

:D Okay, not native, I guess, but ...
ActiveXAnimatedGif.gif
ActiveXAnimatedGif.gif (30.62 KiB) Viewed 561 times

ActiveXAnimatedGif.zip
(28.56 KiB) Downloaded 9 times
User avatar
tidbit
Posts: 1071
Joined: 29 Sep 2013, 17:15
Location: USA

Re: What happened to GIF?

24 Apr 2018, 12:46

according to wiki, the latest official version is from 1989. https://en.wikipedia.org/wiki/GIF
so nothing has changed, unless people/devs/browsers/other are now following a non-official modded gif. Which is believable, 29 years is a looong time AND could also be true since Imagine was last updated almost a decade ago: 2009-09-28.

there's also many other light-weight image viewers, such as the very popular: https://www.irfanview.com/ (lightweight, addons for fancier things. simple UI, still being developed, since 1996).
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
User avatar
Drugwash
Posts: 560
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: What happened to GIF?

24 Apr 2018, 16:31

ActiveX is overkill and takes too long to load (on my machine, at least). Also, back in the 9x days it was considered a high risk and people avoided installing/using it. Good practice, in my opinion.

Imagine v1.1.0 was built in august 2017, unless the dates in the official zip are wrong. I'm referring to the wlx plug-in, mainly, although the exe should bear the same date and indeed checking its VersionInfo it says "Copyright (c) 2003-2017". Whatsnew.txt mentions:

Code: [Select all] [Download] GeSHi © Codebox Plus

v1.1.0, Jul 31 2017
- Fixed: Support for High-DPI awareness
- Added: Command line parameter 'crop'
- Added: Transparency for XPM

v1.0.9, Nov 20 2012
[]


I tried IrfanView a couple times in the past and did not like it. Besides, a plug-in is usually much more responsive than an external application, not to mention the reflex of calling the Lister on any type of file rather than double-clicking to launch any associated application.

Question is: how come old animated GIFs that I have around display correctly in Imagine while those created by newer tools don't? Something must be different, it's only logical. Mr. Spock would agree.
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
User avatar
tidbit
Posts: 1071
Joined: 29 Sep 2013, 17:15
Location: USA

Re: What happened to GIF?

24 Apr 2018, 16:45

oh, I googled "Imagine picture viewer" which brought me here: https://sourceforge.net/projects/open-imagine/files/
probably not the same program?
But ya. times change, things change (seems like gif too, even though wiki says otherwise). Sometime in the future you might just have to upgrade, or just keep dealing with more and more things breaking and being limited to OS's that are less than 2 decades old. (Honestly i'm surprised at how much stuff still works on 95/98/xp)
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
User avatar
Drugwash
Posts: 560
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: What happened to GIF?

25 Apr 2018, 05:49

Yeah, I know the name "Imagine" is too common to be found easily, that's why I had already provided links to its homepage (as well as for FastStone Image Viewer, Total Commander and QtWeb) in first post, should anyone want to test. No,it's not the one at SourceForce.

I know how things work, standards are constantly being changed, and not out of necessity but more out of greed, the planned obsolescence that makes everything unusable in a very short period of time. Many things would still work in XP and lower if there were real programmers out there building those applications, not kiddies that were born in .NET and have no idea how to manipulate the bits in a byte to get eight boolean flags out of it.
Sorry, it always gets me started when it comes to this forcibly being pushed forwards - although I'm not sure that's the correct direction we're being pushed in.

Back to the issue. I've skimmed through information on a few web pages and stumbled into a whole lot of fuss. Couldn't find the real issue as of yet, except for a hunch that the missing Global Color Table may be the issue. Any assistance is welcome.
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
User avatar
derz00
Posts: 487
Joined: 02 Feb 2016, 17:54
GitHub: derz00
Location: Middle of the round cube

Re: What happened to GIF?

25 Apr 2018, 09:21

Hey Drugwash, interesting response. I am quite intrigued by your stubborn use of small hardware and old software. Not that it's wrong. It's just that, as you just implied, you're alone, and there aren't any programmers supporting these old versions of Windows, and you're going to run into issues like this and find only scanty assistance. (this lack of assistance and development is kind of what tidbit didn't like about using Linux, but I'd argue that that has improved) Really I think there's a chance you'd find common values with a lot of the Linux users/developers, which is a growing spectrum of people across the world. FWIW
try it and see
...
User avatar
Drugwash
Posts: 560
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: What happened to GIF?

25 Apr 2018, 10:16

At some point I may get into the Linux subject because I have a lot of beef with that too, but for now I'll just stick with the issue at hand, which is certain GIF animations play poorly in a certain image viewer, and that happens under XP (for now). The viewer is still worked on albeit randomly.

So what I'd need assistance with is what features in the GIF format could drive a (buggy) viewer to display images that way. This requires fair knowledge of the GIF format. So far I have discovered that ill-behaving images do not have a Global Color Table block defined and enabled in the Logical Screen Descriptor, whereas the images that display correctly in the same viewer do have one. But I'm not sure this is the (only) problem.

If I'm to submit a bug report to the author of the image viewer I'd like to provide some useful information, not just "it doesn't work, fix it". It's only fair.

For comparison here's an animated GIF that renders almost correctly in Imagine:
Moving-picture-puppy-dog-barking-animated-gif.gif
Moving-picture-puppy-dog-barking-animated-gif.gif (21.35 KiB) Viewed 471 times

I said "almost" because frames 30 and 31 do have some glitches which are not visible in FastStone Image Viewer:
Moving-picture-puppy-dog-barking-animated-gif_Frame_030.png
Moving-picture-puppy-dog-barking-animated-gif_Frame_030.png (785 Bytes) Viewed 471 times
Moving-picture-puppy-dog-barking-animated-gif_Frame_031.png
Moving-picture-puppy-dog-barking-animated-gif_Frame_031.png (781 Bytes) Viewed 471 times
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
User avatar
Drugwash
Posts: 560
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: What happened to GIF?

25 Apr 2018, 11:59

And here's one animation that has no problems in Imagine:
7614-Tiger-Attacks-Elephant-Rider-Meme-Guy.gif
7614-Tiger-Attacks-Elephant-Rider-Meme-Guy.gif (460.69 KiB) Viewed 470 times


All of the images above are GIF89a according to their header. So… what's the difference? Where's the bug? :?
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
User avatar
tidbit
Posts: 1071
Joined: 29 Sep 2013, 17:15
Location: USA

Re: What happened to GIF?

25 Apr 2018, 12:41

so I tried a gift recorded with licecap, from a browser game. irfanview works, your Imagine (which is actually pretty nice. been looking for a gif editor / frame viewer since I lost my old one) is.. buggy.
comparing the Image Information windows:
Image

note: I got Imagine_1.1.0_Unicode, portable. not the ANSI for old OS's. So it's probably not a version thing.
Maybe... for some reason, it's just Imagine (and probably some others) fault? poorly dev'd gif system or dependency? Nothing strayed from the standards, but just w/e they use for gif support was poorly designed and implemented.
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
User avatar
Drugwash
Posts: 560
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: What happened to GIF?

26 Apr 2018, 02:42

Thank you for testing and glad you found Imagine useful, it does indeed have a few handy functions.

Looking at the two info windows the only difference I see is that Imagine was able to count the unique colors (251) while IrfanView couldn't (Unknown).

I tried both the ANSI and the Unicode variants of 1.1.0 and also 1.0.9 which was installed before, they all exhibit the same faulty behavior. I already acknowledged the problem is in Imagine, but maybe it's not its fault directly - maybe the GIFs are badly built and Imagine just doesn't fix or ignore those issues. The two bad frames of the barking dog could indicate such behavior.

Already noticed an issue where images that do not contain a Global Color Table also have the number of colors in the GCT set to zero although the recommendations found around the web are to have that number present to assist in decoding. That's just one of the deviations from the standard that I noticed so far.

It's also possible for Imagine to behave erroneously when the above-mentioned Global Color Table is completely missing, although that block is marked as optional according to the standard. I need to dig through my collection for some old animated GIFs, see if I can find any that displays correctly even when the GCT is missing, which could rule out this assumption. The goal is to find out exactly where the problem lies, whether it's GIF creators' fault, Imagine's fault, or both.
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
Sam_
Posts: 55
Joined: 20 Mar 2014, 20:24

Re: What happened to GIF?

07 May 2018, 20:26

Here's a bit more detail:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

User avatar
jeeswg
Posts: 4509
Joined: 19 Dec 2016, 01:58
Location: UK

Re: What happened to GIF?

07 May 2018, 21:20

- @Sam_: I'd been interested in converting bmp to png, a png with exactly the same format as MS Paint's png, in case you knew of a way to do this. (Otherwise I can automate MS Paint (Windows XP) to open and save.)
- (Note: I just tested and it seems that the png format is the same for Windows XP and Windows 7.)
- Btw which tools are you using here? Thanks.
User avatar
Drugwash
Posts: 560
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: What happened to GIF?

08 May 2018, 04:25

Thank you, Sam_, the disassembly should prove useful for analyzing whatever could possibly be wrong (or different) that makes Imagine behave erroneously.
I'd be interested too in the specific tool you used for the disassembly, if it's freeware or open-source. Of course, an AHK script could do that too but building it would take some time.

Strangely enough I only found one single reference to the PIANYGIF tag in my searches (maybe the Duck's fault) on this page. Unfortunately it's in Russian and that's one language I haven't had a chance to learn. Won't go anywhere near Google or Bing translators, and Yandex won't let me copy the translated contents complete with HTML tags.

@ jeeswg: Imagine can convert a batch of images, see Tools > Batch convert. It may even provide command-line options but I'm not sure of that.
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
Sam_
Posts: 55
Joined: 20 Mar 2014, 20:24

Re: What happened to GIF?

09 May 2018, 21:17

That was output from the class I am writing to construct, deconstruct, and manipulate GIFs (written in AHK). I'm pretty sure I've worked out the kinks in my LZW implementation, but the compression is considerably slower than I would like. It seems I have chosen a poor hashing strategy... I'll post more on that in the other thread when I have more time. On a side note, do you know any viewers that actually render the "Plain Text Extension"? I think I've implemented decent default parameters if they aren't explicitly given when adding the extension , but without actually being able to test it it is hard to be sure.

About PNG, I have never extensively looked into the details of the format. From what I gather, the compression used in PNG is significantly more complex than GIF's LZW or BMP's RLE, and writing a "good" PNG compressor is quite computationally intensive, even for an optimized and compiled program. I have used zopfliPNG via command line with PNGs a fair bit. When exporting frames/images to PNG from another format, including GIF, I just use GDIPlus.
User avatar
Drugwash
Posts: 560
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: What happened to GIF?

10 May 2018, 11:16

Thanks for the link, I found new things there.

I had no idea GIF could render text until these days while searching for information. So far I don't think I have any image that contains text blocks so can't check the viewers, but either way I don't have anything else besides Imagine and FS Image Viewer.
As for GIF-creating applications… I have yet to find a decent one.

For deconstructing (only), gdiplus should be the easiest way. Not for playing/rendering though. I've just tested the script made by tic and modified by tmplinshi from one of the links in your thread and it's lagging badly with large images, sometimes the lag may be larger than the frame delay itself.

AHK is not suitable for speed-critical operations such as encoding/decoding, encrypting/decrypting, hashing etc. unless those operations are performed inline by an assembler routine or by an external function library. For example, years ago in MyDiary I wanted to implement some sort of empirical encryption and settled for bit rotation; it was all AHK and it did work acceptably for very small databases, but when those grew in size the decryption/encryption would take minutes - completely unacceptable. So I had to build a couple of assembler subroutines that would perform the operations in one go, and call them from the AHK code. Time went down to a few seconds for a 1.5MB database. If I used the crypto API it probably would've taken less but I haven't checked that.
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.

Return to “Offtopic”

Who is online

Users browsing this forum: No registered users and 8 guests