Page 1 of 1
gtkdialog-splash, gifs do not work (solved)
Posted: Wed Jan 03, 2024 9:41 pm
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.
Re: gtkdialog-splash, gifs do not work
Posted: Wed Jan 03, 2024 11:19 pm
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?
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.
Re: gtkdialog-splash, gifs do not work
Posted: Wed Jan 03, 2024 11:55 pm
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.
Re: gtkdialog-splash, gifs do not work
Posted: Thu Jan 04, 2024 1:12 am
by MochiMoppel
- gtkdialog-splash.png (6.25 KiB) Viewed 895 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.
Re: gtkdialog-splash, gifs do not work
Posted: Thu Jan 04, 2024 12:20 pm
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.
Re: gtkdialog-splash, gifs do not work
Posted: Thu Jan 04, 2024 1:20 pm
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 (825 Bytes) Viewed 830 times
Thanks replying.
Re: gtkdialog-splash, gifs do not work
Posted: Thu Jan 04, 2024 2:09 pm
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.
Re: gtkdialog-splash, gifs do not work
Posted: Thu Jan 04, 2024 2:18 pm
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 (24.65 KiB) Viewed 806 times
EDIT; Other example with the rocket launch .gif :
https://dl.dropboxusercontent.com/s/xg2 ... ar.gz?dl=1 (extract and click 'launch')
Re: gtkdialog-splash, gifs do not work
Posted: Thu Jan 04, 2024 2:49 pm
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.
Re: gtkdialog-splash, gifs do not work
Posted: Thu Jan 04, 2024 2:49 pm
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 :
https://dl.dropboxusercontent.com/s/xg2 ... ar.gz?dl=1 (extract and click 'launch')
Thanks for all the info guys.
Re: gtkdialog-splash, gifs do not work (solved)
Posted: Thu Jan 04, 2024 5:10 pm
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 ).
Re: gtkdialog-splash, gifs do not work (solved)
Posted: Thu Jan 04, 2024 5:15 pm
by Sofiya
Code: Select all
gtkdialog-splash -timeout 10 -icon '/files/downloads/3228.gif' -text 'GIF works!'
Re: gtkdialog-splash, gifs do not work (solved)
Posted: Thu Jan 04, 2024 5:20 pm
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 )
Re: gtkdialog-splash, gifs do not work (solved)
Posted: Thu Jan 04, 2024 5:28 pm
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
Re: gtkdialog-splash, gifs do not work (solved)
Posted: Thu Jan 04, 2024 5:54 pm
by Sofiya
Re: gtkdialog-splash, gifs do not work (solved)
Posted: Thu Jan 04, 2024 6:21 pm
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!
I'm already thinking up ideas for what I can use this for....
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.
Re: gtkdialog-splash, gifs do not work (solved)
Posted: Thu Jan 04, 2024 7:07 pm
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.
Re: gtkdialog-splash, gifs do not work (solved)
Posted: Thu Jan 04, 2024 11:30 pm
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:-
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! )
So thanks are in order AGAIN! (You must get embarrassed with all this praise being heaped upon you, huh? )
Mike.