gtkdialog-splash, gifs do not work (solved)

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
xx_T3n0ch_X
Posts: 36
Joined: Thu Jul 22, 2021 1:31 am
Has thanked: 3 times
Been thanked: 10 times

gtkdialog-splash, gifs do not work (solved)

Post by xx_T3n0ch_X »

gtkdialog-splash's help reads:

Code: Select all

-icon GTK-XXX (for example: gtk-info all gtk-stock-symbols, default: none)
    OR path/to/pixmap.png|gif|jpeg|svg

Has anyone successfully used a GIF?

My questions were answered, thanks to all of you for the valuable input.

Last edited by xx_T3n0ch_X on Thu Jan 04, 2024 3:32 pm, edited 1 time in total.
User avatar
mikewalsh
Moderator
Posts: 6185
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 803 times
Been thanked: 1994 times

Re: gtkdialog-splash, gifs do not work

Post by mikewalsh »

@xx_T3n0ch_X :-

Mm. O-kayyy...

You're talking about this kind of thing.....where I've used an icon at the left-side of a gtk-dialog splash banner for the Nvidia TrayTemp utility?

Image

Yes.....or no? If yes, are you asking if a GIF can be used instead of a 'static' image? Simple answer is, I don't think it can. Gtk-dialog is used primarily for brief notification purposes; why try to "tart it up to the nines"?

(I guess you might be able to make it work, IF you were any good at scripting AND re-jigging the source code prior to re-compiling the shared library itself...)

Mike. :?

xx_T3n0ch_X
Posts: 36
Joined: Thu Jul 22, 2021 1:31 am
Has thanked: 3 times
Been thanked: 10 times

Re: gtkdialog-splash, gifs do not work

Post by xx_T3n0ch_X »

As mentioned, gtkdialog-splash -h shows the following for the icon flag:

-icon GTK-XXX (for example: gtk-info all gtk-stock-symbols, default: none)
OR path/to/pixmap.png|gif|jpeg|svg

So, I'm just trying to find out if there is something that I'm not doing right, It appears, then, that GIFs do not work. Thanks.

User avatar
MochiMoppel
Posts: 1243
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 444 times

Re: gtkdialog-splash, gifs do not work

Post by MochiMoppel »

gtkdialog-splash.png
gtkdialog-splash.png (6.25 KiB) Viewed 919 times

Code: Select all

gtkdialog-splash -timeout 3 -icon '/root/Downloads/icon_e_confused.gif' -text 'GIF works!'

icon_e_confused.gif was downloaded from @mikewalsh's previous post.

mikewalsh wrote: Wed Jan 03, 2024 11:19 pm

are you asking if a GIF can be used instead of a 'static' image? Simple answer is, I don't think it can. Gtk-dialog is used primarily for brief notification purposes

A GIF is a static image and because its color palette is limited and therefore its file size is small, it loads fast and makes it ideal for splash messages. Don't assume that a GIF has to be animated. By design it is not.

I guess you might be able to make it work, IF you were any good at scripting AND re-jigging the source code prior to re-compiling the shared library itself...)

??? I don't know which shared library you have in mind.
gtkdialog-splash accepts animated GIFs but displays only the first frame. This is due to the fact that all icons are scaled to 32px width. If this width rescriction is removed from gtkdialog-splash (by deleting 1 line of code) animated GIFs will play.

User avatar
mikewalsh
Moderator
Posts: 6185
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 803 times
Been thanked: 1994 times

Re: gtkdialog-splash, gifs do not work

Post by mikewalsh »

@MochiMoppel :-

Ah. Hm. Interesting.....

So; we're talking here about "gtkdialog-splash".....NOT "box_splash"?

I'm not very good at reading other folks' scripts, I'll own. I can just about manage my own, but that's only because I know what I intended them to do in the first place!

I can only see a couple of mentions of icons in the gtk-dialog script, but even there I don't see any mention of scaling. Um.....would it be the one that mentions "input file stock" (line 120)?

Code: Select all

icon="<pixmap><input file stock=\"$arg\"></input></pixmap>"

That's only a guess, based on the fact that as I understand it, the 'stock' gtk icon-set is all 'preset' in terms of dimensions. I'm really not sure what I'm looking at, or for here, I'll be honest. The whole gtk 'system' confuses the hell out of me.....but I would be interested in finding out how to make this work.

(BTW; where I mentioned a shared library, I was sort of assuming the gtk stuff was all linked to and controlled by a library like libgtk-3.0.....or something similar. That was all I meant.)

Mike. ;)

xx_T3n0ch_X
Posts: 36
Joined: Thu Jul 22, 2021 1:31 am
Has thanked: 3 times
Been thanked: 10 times

Re: gtkdialog-splash, gifs do not work

Post by xx_T3n0ch_X »

MochiMoppel wrote: Thu Jan 04, 2024 1:12 am

gtkdialog-splash.png

Code: Select all

gtkdialog-splash -timeout 3 -icon '/root/Downloads/icon_e_confused.gif' -text 'GIF works!'

icon_e_confused.gif was downloaded from @mikewalsh's previous post.

mikewalsh wrote: Wed Jan 03, 2024 11:19 pm

are you asking if a GIF can be used instead of a 'static' image? Simple answer is, I don't think it can. Gtk-dialog is used primarily for brief notification purposes

A GIF is a static image and because its color palette is limited and therefore its file size is small, it loads fast and makes it ideal for splash messages. Don't assume that a GIF has to be animated. By design it is not.

I guess you might be able to make it work, IF you were any good at scripting AND re-jigging the source code prior to re-compiling the shared library itself...)

??? I don't know which shared library you have in mind.
gtkdialog-splash accepts animated GIFs but displays only the first frame. This is due to the fact that all icons are scaled to 32px width. If this width rescriction is removed from gtkdialog-splash (by deleting 1 line of code) animated GIFs will play.

Yes, most of us, if we see GIF, we assume movement, animation, not just loading the initial frame, I was thinking about use cases like when loading something, to have that animated circle going

Throbber-small.gif
Throbber-small.gif (825 Bytes) Viewed 854 times

Thanks replying.

User avatar
MochiMoppel
Posts: 1243
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 444 times

Re: gtkdialog-splash, gifs do not work

Post by MochiMoppel »

xx_T3n0ch_X wrote: Thu Jan 04, 2024 1:20 pm

most of us, if we see GIF, we assume movement, animation

Is that what you meant by "gifs do not work"? If you meant animated gifs do not work then you should say so. And who is "we"? How do you know what "most of us" assume? Take a look at the top of this board's edit screen. You see 13 Post icon GIFs. How many animated? Yes, 1. And out of the 29 smileys? 5.
Maybe you should change your perception.

User avatar
fredx181
Posts: 3113
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 378 times
Been thanked: 1330 times
Contact:

Re: gtkdialog-splash, gifs do not work

Post by fredx181 »

xx_T3n0ch_X wrote:

... if we see GIF, we assume movement, animation, not just loading the initial frame, I was thinking about use cases like when loading something, to have that animated circle going

About animation (and more) it's discussed and experimented in the old forum : https://oldforum.puppylinux.com/viewtopic.php?t=114446
With some changes in gtkdialog-splash script (or box_splash, whatever it's called) it's possible to have .gif animated, but the .gif cannot be scaled (i.e. -icon_width ... setting will lose the animation, become static)

2024-01-04_14-38-13.gif
2024-01-04_14-38-13.gif (24.65 KiB) Viewed 830 times
animated-gif-splash.tar.gz
Extract and click 'launch'
(3.61 KiB) Downloaded 21 times

EDIT; Other example with the rocket launch .gif :D :
Image

https://dl.dropboxusercontent.com/s/xg2 ... ar.gz?dl=1 (extract and click 'launch')

Tenoch
Posts: 16
Joined: Fri Mar 05, 2021 5:22 pm
Has thanked: 4 times
Been thanked: 3 times

Re: gtkdialog-splash, gifs do not work

Post by Tenoch »

MochiMoppel wrote: Thu Jan 04, 2024 2:09 pm
xx_T3n0ch_X wrote: Thu Jan 04, 2024 1:20 pm

most of us, if we see GIF, we assume movement, animation

Is that what you meant by "gifs do not work"? If you meant animated gifs do not work then you should say so. And who is "we"? How do you know what "most of us" assume? Take a look at the top of this board's edit screen. You see 13 Post icon GIFs. How many animated? Yes, 1. And out of the 29 smileys? 5.
Maybe you should change your perception.

sure, again thanks for the information.

Last edited by Tenoch on Thu Jan 04, 2024 2:52 pm, edited 1 time in total.
Tenoch
Posts: 16
Joined: Fri Mar 05, 2021 5:22 pm
Has thanked: 4 times
Been thanked: 3 times

Re: gtkdialog-splash, gifs do not work

Post by Tenoch »

fredx181 wrote: Thu Jan 04, 2024 2:18 pm
xx_T3n0ch_X wrote:

... if we see GIF, we assume movement, animation, not just loading the initial frame, I was thinking about use cases like when loading something, to have that animated circle going

About animation (and more) it's discussed and experimented in the old forum : https://oldforum.puppylinux.com/viewtopic.php?t=114446
With some changes in gtkdialog-splash script (or box_splash, whatever it's called) it's possible to have .gif animated, but the .gif cannot be scaled (i.e. -icon_width ... setting will lose the animation, will be static)
2024-01-04_14-38-13.gif
animated-gif-splash.tar.gz

EDIT; Other example with the rocket launch .gif :D :
Image

https://dl.dropboxusercontent.com/s/xg2 ... ar.gz?dl=1 (extract and click 'launch')

Thanks for all the info guys.

User avatar
fredx181
Posts: 3113
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 378 times
Been thanked: 1330 times
Contact:

Re: gtkdialog-splash, gifs do not work (solved)

Post by fredx181 »

@Tenoch Looks like you are posting under different names (also as xx_T3n0ch_X, first post) in general, please don't, anyway in this (one) thread it may be confusing (who=who :?: ).

User avatar
Sofiya
Posts: 2294
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1483 times
Been thanked: 1547 times

Re: gtkdialog-splash, gifs do not work (solved)

Post by Sofiya »

Code: Select all

 gtkdialog-splash -timeout 10 -icon '/files/downloads/3228.gif' -text 'GIF works!'
Attachments
Скриншот.gif
Скриншот.gif (160.33 KiB) Viewed 770 times

KL
PUPPY LINUX Simple fast free

User avatar
fredx181
Posts: 3113
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 378 times
Been thanked: 1330 times
Contact:

Re: gtkdialog-splash, gifs do not work (solved)

Post by fredx181 »

Sofiya wrote: Thu Jan 04, 2024 5:15 pm

Code: Select all

 gtkdialog-splash -timeout 10 -icon '/files/downloads/3228.gif' -text 'GIF works!'

On which system ? (probably depends :?: )

User avatar
Sofiya
Posts: 2294
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1483 times
Been thanked: 1547 times

Re: gtkdialog-splash, gifs do not work (solved)

Post by Sofiya »

fredx181 wrote: Thu Jan 04, 2024 5:20 pm
Sofiya wrote: Thu Jan 04, 2024 5:15 pm

Code: Select all

 gtkdialog-splash -timeout 10 -icon '/files/downloads/3228.gif' -text 'GIF works!'

On which system ? (probably depends :?: )

EasyOS gtkdialog-splash is installed

KL
PUPPY LINUX Simple fast free

User avatar
Sofiya
Posts: 2294
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1483 times
Been thanked: 1547 times

Re: gtkdialog-splash, gifs do not work (solved)

Post by Sofiya »

:thumbup:

Attachments
Скриншот.gif
Скриншот.gif (151.05 KiB) Viewed 744 times

KL
PUPPY LINUX Simple fast free

User avatar
mikewalsh
Moderator
Posts: 6185
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 803 times
Been thanked: 1994 times

Re: gtkdialog-splash, gifs do not work (solved)

Post by mikewalsh »

@fredx181 :-

Ah, Frederico, mijn vriend; you've excelled yourself.....AGAIN. Another perhaps "silly" - yet very entertaining, AND useful - widget for Puppy's desktop "arsenal". Nice one, mate!

Image

Image

I'm already thinking up ideas for what I can use this for.... :D

Out of curiosity, just where DID you make the modification to gtkdialog-splash? Mochi mentioned one single line; I compared yours to the original, but I'm buggered if I can spot it....

Re: the 'size' thing. Stands to reason if you have a GIF you want to use - and it's too big - then it needs re-sizing manually first. Easiest way I know is to do it online.......and for that, I recommend this site:-

https://ezgif.com/

You can do literally anything you want with GIFs here.....from simple re-sizing & speed-changes all the way up to complex editing on the appearance of the GIF itself. I've used it many times, and have been very impressed with the results.

(FYI, this is in BK's old Quirky64 April 701......though there's nowt 'standard' about this one at ALL. I've lost track of the number of mods I've performed, though chief amongst them are k3.14.79 -> k5.4.53 (FP64's original), and glibc from 2.20 -> Busterpup64's 2.28. It runs stuff through 2 different chroots, and has served as the development test-bed for most of the utilities I've created... It's never let me down yet.)

Mike. ;)

User avatar
fredx181
Posts: 3113
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 378 times
Been thanked: 1330 times
Contact:

Re: gtkdialog-splash, gifs do not work (solved)

Post by fredx181 »

mikewalsh wrote:

Out of curiosity, just where DID you make the modification to gtkdialog-splash? Mochi mentioned one single line; I compared yours to the original, but I'm buggered if I can spot it....

Bottom line is, as far as I can remember, that forum member Argolance found that old version of gtkdialog-splash supported "moving gifs" and see further in the old-forum thread that I linked to.
edit: later puppy versions have 'box_splash' it's the gtkdialog-splash replacement.

User avatar
mikewalsh
Moderator
Posts: 6185
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 803 times
Been thanked: 1994 times

Re: gtkdialog-splash, gifs do not work (solved)

Post by mikewalsh »

@fredx181 :-

So..... Here's the first "casualty" of my new obsession! This is a re-worked version of the 'splash' notification for the NvidiaTrayTemp utility.....displaying a GPU complete with spinning fans and RGB lighting:-

Image

It's surprising how few GIFs on this subject can be found online, and at that, gipher.com and giphy.com were about the only sites that offered very much at all.

(I had some fun capturing this. TakeAGif - because you're basically turning one GIF into another GIF - gave very weird results. The fans just stood still, rocking slightly back'n'forth. So I tried a different approach; capturing it with XVidCap, then running that through Gifenc-sel. THAT did the trick! :D )

So thanks are in order AGAIN! (You must get embarrassed with all this praise being heaped upon you, huh? :shock: :D :lol: )

Mike. ;)

Post Reply

Return to “Users”