You are not logged in.

#101 2011-04-05 00:45:54

Grinch
Member
Registered: 2010-11-07
Posts: 265

Re: sxiv - Simple image viewer written in C

Hey this is very nice, great work ber_t! I skimmed the thread but saw no mention of it so I figured I'd ask, any chance of it later being able to open images within archives? Probably not since that's likely outside the scope of a 'simple' image viewer but I thought I'd ask. Either way very nice work!

Offline

#102 2011-04-05 08:59:31

dlz
Member
Registered: 2011-04-04
Posts: 18

Re: sxiv - Simple image viewer written in C

ber_t wrote:

I used strace to get an idea how much data imlib_load_image reads, when used like in img_check, and it seems it only reads a small amount of 4k-byte-blocks per image. So the speed penalty is really small, considering the huge amount of files each X-app has to read at startup.

i found a way to reproduce the "imlib interlace jpeg" problem.
you can use imagemagick for that.

for File in *.jpg; do convert -interlace line -quality 90 $File TestDir/$File;done;

now try to

sxiv *.jpg

with the interlaced jpegs!
maybe you add a command line switch to disable "preload/precheck".
thank you, for looking at that problem!

Offline

#103 2011-04-07 22:46:31

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: sxiv - Simple image viewer written in C

i haven't seen this brought up yet and checked the github readme, but is there going to be SVG support?  not sure if that's out of scope or not.

Offline

#104 2011-04-08 15:27:37

ber_t
Member
From: Berlin, Germany
Registered: 2010-03-10
Posts: 214
Website

Re: sxiv - Simple image viewer written in C

Grinch wrote:

Any chance of it later being able to open images within archives?

Nope.

dlz wrote:

Maybe you add a command line switch to disable "preload/precheck".

Done: -a.

milomouse wrote:

Is there going to be SVG support?

Please ask the imlib2 devs for new file formats.

Is anyone willing to try out the tcache branch? Thumbnail caching seems to work fine, but it needs a bit of testing before I can merge it into HEAD. You need to create the ~/.sxiv/ directory to enable it. Thanks.

Offline

#105 2011-04-08 15:47:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: sxiv - Simple image viewer written in C

ber_t wrote:

Is anyone willing to try out the tcache branch? Thumbnail caching seems to work fine, but it needs a bit of testing before I can merge it into HEAD. You need to create the ~/.sxiv/ directory to enable it. Thanks.

Me, me, me! Pick me!

How do I do that? I don't know jack about git and branches but I'm exceptionally good at copy-pasting commands ;P

Offline

#106 2011-04-08 15:55:49

ber_t
Member
From: Berlin, Germany
Registered: 2010-03-10
Posts: 214
Website

Re: sxiv - Simple image viewer written in C

karol wrote:

How do I do that? I don't know jack about git and branches but I'm exceptionally good at copy-pasting commands ;P

$ git clone git://github.com/muennich/sxiv.git
$ cd sxiv/
$ git checkout tcache
$ make

Offline

#107 2011-04-08 16:03:26

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: sxiv - Simple image viewer written in C

ber_t wrote:
karol wrote:

How do I do that? I don't know jack about git and branches but I'm exceptionally good at copy-pasting commands ;P

$ git clone git://github.com/muennich/sxiv.git
$ cd sxiv/
$ git checkout tcache
$ make

It works!
I'm running it like this: '/home/karol/sxiv/sxiv -t *' - do I need to redirect all this info

cache hit:  026c285cgoogle.jpg
cache hit:  10119116.jpg
cache hit:  14l0juo.jpg
...

to a log to keep my terminal output clean?

Last edited by karol (2011-04-08 16:06:18)

Offline

#108 2011-04-08 17:46:55

ber_t
Member
From: Berlin, Germany
Registered: 2010-03-10
Posts: 214
Website

Re: sxiv - Simple image viewer written in C

I've forgot to remove those debug outputs. They're gone now. Just do a `git pull' and repeat the make...

Offline

#109 2011-04-08 20:58:42

dwindle
Member
From: /dev/urandom/
Registered: 2009-05-15
Posts: 85
Website

Re: sxiv - Simple image viewer written in C

This looks really nice. I've been looking for an image viewer like this.
qiv is cool but doesn't like to resize the window or let you pan huge images.
I use mirage when i wanna browse my funny pictures but it sometimes takes a crap loading everything and screws up the picture order temproarily.
My only qualm is that there is no animated gif support. Any plans to add this in the future?
Great job, ber_t!


[nil]
[exists]

Offline

#110 2011-04-09 12:40:56

ber_t
Member
From: Berlin, Germany
Registered: 2010-03-10
Posts: 214
Website

Re: sxiv - Simple image viewer written in C

dwindle wrote:

My only qualm is that there is no animated gif support. Any plans to add this in the future?

I'm using `gifview -a' (found in extra/gifsicle) for that. If you're using sxiv-git, then you can add the following line to the commands array in commands.h:

static command_t commands[] = {
  { XK_g, False, "gifview -a #" },
  ...
};

and then use Ctrl-g to open the current gif in gifview. You also have to enable external commands at the end of config.h for this to work...

Offline

#111 2011-04-10 00:36:35

dwindle
Member
From: /dev/urandom/
Registered: 2009-05-15
Posts: 85
Website

Re: sxiv - Simple image viewer written in C

ber_t wrote:
dwindle wrote:

My only qualm is that there is no animated gif support. Any plans to add this in the future?

I'm using `gifview -a' (found in extra/gifsicle) for that. If you're using sxiv-git, then you can add the following line to the commands array in commands.h:

static command_t commands[] = {
  { XK_g, False, "gifview -a #" },
  ...
};

and then use Ctrl-g to open the current gif in gifview. You also have to enable external commands at the end of config.h for this to work...

Ah! That works nicely. Thanks ber_t big_smile


[nil]
[exists]

Offline

#112 2011-04-12 22:06:58

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

Re: sxiv - Simple image viewer written in C

This is exactly what I was looking for in an image viewer. Thanks a lot!

Offline

#113 2011-04-14 10:41:10

ber_t
Member
From: Berlin, Germany
Registered: 2010-03-10
Posts: 214
Website

Re: sxiv - Simple image viewer written in C

Released version 0.8.

New:

- Cache thumbnails; you have to create ~/.sxiv/ to enable this, see sxiv(1); clean the cache with -c option
- Support for external commands, enable and define them in config.h
- Remove images from filelist if they couldn't get loaded, do not pre-check files on startup

The default config.h is included in the AUR source-tarball, so that you can easily change it and rebuild the package afterwards.

Offline

#114 2011-04-14 13:21:08

EiyuuZack
Member
Registered: 2011-04-11
Posts: 17

Re: sxiv - Simple image viewer written in C

Hi all,

First off I apologize my first post is to leech rather than contribute but I expect to start doing so in short term. I have a pure Openbox desktop yet fullscreen isn't working for me. Using the -f option sxiv starts normally, that is non-fullscreen, and pressing f doesn't do anything. I'm using the non-git version. If I recall correctly Openbox is EWMH compliant and I don't see anyone bringing this up which leads me to think the problem is on my end. So my question is, do I have to enable some setting on Openbox, perhaps compile it with specific flags? Or am I just missing something really simple? This all I need sorted out to drop feh once and for all.

Amazing work ber_t, keep it up!

Offline

#115 2011-04-14 16:56:48

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

Re: sxiv - Simple image viewer written in C

It would be better to advise simply using the --skipinteg makepkg flag instead of going through doing makepkg -g, since they are changing the files themselves (so a check is pointless).

Offline

#116 2011-04-14 17:07:33

gorilla
Member
From: Berlin
Registered: 2010-06-15
Posts: 72

Re: sxiv - Simple image viewer written in C

why don't put:

#vim config.h ## comment out to configure sxiv to your needs

into the PKGBUILD?

Great work btw. The cacheing is working perfect.

Last edited by gorilla (2011-04-15 09:49:20)

Offline

#117 2011-04-14 18:20:45

ber_t
Member
From: Berlin, Germany
Registered: 2010-03-10
Posts: 214
Website

Re: sxiv - Simple image viewer written in C

Thank you all for using sxiv and giving feedback.

EiyuuZack wrote:

I have a pure Openbox desktop yet fullscreen isn't working for me.

Initially I wanted to say that openbox doesn't fully adhere to the EWMH standard, but after looking at it's test-program, I finally discovered the very little bug in sxiv's code, that prevented the fullscreen mode from working correctly. Have I already mentioned that I hate programming against the Xlib API? Please use sxiv-git until the next stable version is released.

neurolysis wrote:

It would be better to advise simply using the --skipinteg makepkg flag

You're right, I've changed it right away.

@gorilla: Thanks, but I prefer it the way it is right now.

Offline

#118 2011-04-15 03:13:56

Sara
Member
From: USA
Registered: 2009-07-09
Posts: 219
Website

Re: sxiv - Simple image viewer written in C

I had to come in here and comment about the new thumbnail caching--it is totally awesome! This is one of those features typically found in heavy-weight image viewers that are so useful, yet I never imagined seeing in a nice lightweight (and suckless) program like this. Thanks a lot!


Registed Linux User 483618

Offline

#119 2011-04-15 12:28:44

EiyuuZack
Member
Registered: 2011-04-11
Posts: 17

Re: sxiv - Simple image viewer written in C

Thanks ber_t, git version is shinning, and feh has been -Rsn'ed. And yeah, from what I've heard, the Xlib API could use a facelift. Now, onto checking out sxiv's thumbnail caching.

Offline

#120 2011-04-17 09:21:04

dlz
Member
Registered: 2011-04-04
Posts: 18

Re: sxiv - Simple image viewer written in C

i just installed version 0.8 from AUR.
just want to say, that the new solution without the "-a" option is a really good one!
thank you!

Offline

#121 2011-04-17 21:10:33

Ogion
Member
From: Germany
Registered: 2007-12-11
Posts: 367

Re: sxiv - Simple image viewer written in C

Very nice, ber_t!
Replaces qiv for me smile (while qiv does what i want, it's still a bit too featureful and has some annoying bugs, like that it devours every keypress regardless of modifier keys for the wm or whatever when in fullscreen, or that weird behaviour when not in fullscreen)

One or two things: Am i doing something wrong, or do i in fact have to press f in sxiv and then do whatever keybind my wm has for fullscreen? I mean to change the background color to black (which i find less intruding on the pictures than grey background). Also i noticed (in awesomewm at least) that when i fullscreen it with the window manager and then press f in sxiv it breaks the fullscreen again…

There is something odd about the way zooming in and out behaves, but i'm not quite sure if this is from your program or imlib2, at least it behaves differently than qiv (qiv's behaviour with respect to zooming i also don't like). Specifically, i'd prefer that when i zoom in, it stays centered on what i centered before. Like i zoom in once, then choose some part of the picture with arrowkeys, and then i press + another time to zoom in and suddenly i get another part of the picture. In qiv the picture recenters, which is also annoying. Any way of making it so that it stays on the same part of the picture when zooming in/out?

Ogion


(my-dotfiles)
"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
"Enlightenment is man's leaving his self-caused immaturity." - Immanuel Kant

Offline

#122 2011-04-18 01:32:53

ntness
Member
From: The World
Registered: 2009-12-29
Posts: 97

Re: sxiv - Simple image viewer written in C

Came here to parrot others...thanks for your wonderful contribution. Goodbye feh! big_smile


transcend to the fifth abode

Offline

#123 2011-04-18 21:00:09

archman-cro
Member
From: Croatia
Registered: 2010-04-04
Posts: 943
Website

Re: sxiv - Simple image viewer written in C

Thank you for this amazing viewer! The only thing I'd like is to be able to browse to the next/previous image without using '-r', since I can't open the wanted picture with it.
Or just a command to search the dir from where the opened pic is would be outstanding!

Edit: Hmm, kinda fixed it with Ranger.

Another request I've already seen here is an option to choose the background color. That'd rule.

Edit2: Nvm, it's so easy to rebuild a package. smile

Cheers!

Last edited by archman-cro (2011-04-18 22:29:57)

Offline

#124 2011-04-19 12:55:19

ber_t
Member
From: Berlin, Germany
Registered: 2010-03-10
Posts: 214
Website

Re: sxiv - Simple image viewer written in C

Ogion wrote:

One or two things: Am i doing something wrong, or do i in fact have to press f in sxiv and then do whatever keybind my wm has for fullscreen? I mean to change the background color to black (which i find less intruding on the pictures than grey background). Also i noticed (in awesomewm at least) that when i fullscreen it with the window manager and then press f in sxiv it breaks the fullscreen again…

I've installed awesomewm just to test sxiv's fullscreen mode. It turned out, that awesomewm does support the _NET_WM_STATE_FULLSCREEN atom, you can tell so, because the window shortly flickers into fullscreen, before getting pushed back into normal mode. This is caused by awesomewm, because it doesn't support the _NET_WM_STATE_ABOVE atom, which was also set in sxiv's fullscreen mode. Long story short: I removed the setting of the _NET_WM_STATE_ABOVE atom, so that fullscreen is finally working under awesomewm and all other buggy WMs...

Ogion wrote:

Any way of making it so that it stays on the same part of the picture when zooming in/out?

Until today I thought, that I've done it just like this. But the used formula was just plain wrong. I've corrected it and it seems to work correctly now.

Offline

#125 2011-04-19 22:34:40

Ogion
Member
From: Germany
Registered: 2007-12-11
Posts: 367

Re: sxiv - Simple image viewer written in C

Awesome! Confirmed and confirmed (both the things work now). smile

Ogion


(my-dotfiles)
"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
"Enlightenment is man's leaving his self-caused immaturity." - Immanuel Kant

Offline

Board footer

Powered by FluxBB