I have a idea. Modify user.gmic. Add a command named prawnsushi_display which calls +blend alpha display
and use that command instead of display.
Nice! Will do that Let’s call it
dab
, if I can.
Mission complete!
NB: On lInux the (hidden) file is named “.gmic” and is located in the user’s home folder.
BTW forget my request it was not related to this viewer : I launched Paper Cuts in the standalone version of Gmic-Qt and it just displayed 40 layers after completion. So having a shortcut for blend alpha
in your viewer wouldn’t help in that case.
Regarding a 1-1 view, would a pixel inspector overlay be something worth looking into? That is, the full image overlaid by sub-image window/image.
Is this a bug?
The info overlay doesn’t update the ID, name and dimensions when I use keyboard shortcuts to switch images ( Space, B (thanks!), Backspace, Ctrl Arrows).
But it’s updated when i hover or click the thumbnails.
Below I selected Duck with mouse, and switched using keyboard. It still says Duck , id 4 and dimensions are wrong.
Fixed, thanks for reporting. Filter update should be ready in a few minutes.
Keys 1
→ 9
should now set the zoom factor to 1:1
→ 1:9
.
Use 0
to reset zoom to x1
(full view).
Doesn’t work quite well with very small images though (e.g. 3x3
), so I need to investigate to fix the rendering in that case.
Very good, in my case of image stacks in z the exact zoom factor helps too!
Shortcut 0
could be reassigned to something else I think, Enter
can already reset the image.
Instead, 0
could apply the 1x1
(or others) to all images in the list? Currently all images have different NxN settings.
Yes, it appears that Enter can be used to reset the view. But 0 is a nice addition as it implies it reset the view with 1-9 key by association. Could go either way.
Sure, I don’t mind actually.
But applying the NxN view globally could be easier on our fingers (i have to do shift+N for each image)
@David_Tschumperle Another strange info display behavior : When hovering the thumbnails, sometimes “Thumb #1” is not displayed. Happened for Thumb 5 too.
NVM, i found out why, it’s normal because it’s the currently displayed image xD
I think Normalization:
can be changed to Display Mode:
or even Visual Mode:
as that is more language-agnostic and some few other description (if needed) just so that it’s accurate.
Speaking of modes, it would be nice if the viewer could indicate it in the info overlay. That is, the info overlay can be toggled to reveal more information about the view such as normalization and zoom level statuses. That would save effort in toggling through various modes and guesswork.
I don’t think this is relevant.
Normalization
is called “Normalization” because it is related to pixel/voxel value normalization (and then, to command normalize
). Display Mode
means nothing in this context.
I’m not trying to be language-agnostic, it’s pretty clear that G’MIC is aimed at people who have some grounding in image processing (and value normalization is indeed one of the ABCs of image processing).
ENTER
does not exactly the same as 0
: it resets the view, including the zoom factor and the center. If we remove the current effect for 0
, there are no ways to reset the zoom factor to x1
, except pushing Z
several time until it set zoom factor to x1
.
I’d like to keep the info overlay as small as possible (one line max), because it already takes (too much for my taste) canvas space. As changing the different mode actually refreshes the images really quick, I don’t think that’s necessary to make the info label more complex.
Oh I see it now that i’ve moved the image around.
Can it be displayed over the thumbnails bar? I think they are less important than the full view so masking them a little is less of a problem.
I agree, though a verbose option may be attractive to some users.
Depending on the image, the mode may not always be obvious.
BTW, my thoughts in the thread are not my personal feature request: just brainstorming.
Progress report #8:
- Today, I’ve been focusing on optimizing the viewer in the case where the image list contains a lot of images. Typically, this happen when we load image sequences with thousands of images, or when we parse ASCII files (decomposing each line as an image).
For instance:
$ gmic it gmic_stdlib.gmic s -,10
generates a list of 53618 (small) 1xN
images, where N
is varying.
Before today, trying to display such a list of images would lead to a noticeable delay (a few seconds) between the apparition of the window, and the displayed image content.
To solve this, I’ve improved how the thumbnail navigation bar is rendered, basically with caching of rendered thumbnail caching and the reduction of the necessary memory for storing multiple thumbnails. Right now, the command below runs immediately, and you can navigate through the 53618 images flawlessly.
Not the most visible part of the viewer, but still a great improvement!
- Implementing the viewer made me also realize that there were a bug with the
for...done
construct in G’MIC, when commands containingfor
were called recursively.
For instance, the example below was causing an issue:
foo :
echo "FOO"
x=0
for $x<1 {
if !narg($_var) _var=1 v + foo fi
x+=1
}
when it should just display FOO
twice.
The interpreter thought that the second for
it encounters was actually the same as the first one, without taking the calling scope into account.
This is now fixed, and the example above now runs correctly.
- Tomorrow, I’ll probably polish the existing code a little bit more, then start implementing the 3D mesh part of the viewer.
As this viewer is going to be a great improvement to G’MIC, I’ve also decided to number the next version to 3.3.0.
Stay tuned!
@David_Tschumperle Nice! How much time do you spend on G’MIC/Cimg nowadays? More or less than before?
I’d say, a basis of at least 2h every day. Then depending on my free time, it can go up to 8-10h (which was the case the last two weeks, as it was still vacations for many people at the lab).
One thing, I think it would be helpful to display 1-dim images a bit enlarged, similar to the 3.2.6 display. E.G. the switch (M) between mesh and image display would allow better the inspection.
It would be easier to navigate images with ratio really close to 0 or diagonal angle close to 0/90 if we had the option to automatically resize with a button. I like the old behavior for this case.