<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nsxiv/image.c, branch master</title>
<subtitle>Nsxiv image view custom build
</subtitle>
<id>https://git.krolyxon.com/nsxiv/atom?h=master</id>
<link rel='self' href='https://git.krolyxon.com/nsxiv/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/'/>
<updated>2023-05-23T11:36:41Z</updated>
<entry>
<title>set a default delay if delay is 0 (#445)</title>
<updated>2023-05-23T11:36:41Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2023-05-23T11:36:41Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=0e1bc3c045384bca18922accbc50fa6914a67bd0'/>
<id>urn:sha1:0e1bc3c045384bca18922accbc50fa6914a67bd0</id>
<content type='text'>
gif spec [0] doesn't mention what to do when "Delay Time" is 0.

apng spec [1] states:

| If the the value of the numerator is 0 the decoder should render the
| next frame as quickly as possible, though viewers may impose a
| reasonable lower bound.

webp spec [2]:

| the interpretation of frame duration of 0 (and often &lt;= 10) is
| implementation defined.

so it seems that it's safe to set a default delay for 0 delay frames,
which is what the older gif and webp loaders were already doing. do the
same for the imlib2 multi-frame loader as well.

[0]: https://www.w3.org/Graphics/GIF/spec-gif89a.txt
[1]: https://wiki.mozilla.org/APNG_Specification
[2]: https://developers.google.com/speed/webp/docs/riff_container#animation

Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/445
Reviewed-by: eylles &lt;eylles@noreply.codeberg.org&gt;
</content>
</entry>
<entry>
<title>fix: calling imlib2 with color modifier being NULL (#440)</title>
<updated>2023-05-18T15:06:44Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2023-05-18T15:06:44Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=d0ec8716d7d4d0cfb0067290cac51b59b7fd4e42'/>
<id>urn:sha1:d0ec8716d7d4d0cfb0067290cac51b59b7fd4e42</id>
<content type='text'>
the multiframe loaders sets the color modifier to NULL but doesn't
restore it before returning. this results in a imlib2 developer warning
if you try to change brightness/contrast on a multiframe image (which
doesn't have alpha).

ensure that the color modifier is restored before returning under all
paths.

Reported-by: Madhu

Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/440
Reviewed-by: eylles &lt;eylles@noreply.codeberg.org&gt;
</content>
</entry>
<entry>
<title>fix: loading old frames due to multi-frame cache (#437)</title>
<updated>2023-05-18T15:05:45Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2023-05-18T15:05:45Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=4b67816eae77db28db64e5e80d0d99c60e74973f'/>
<id>urn:sha1:4b67816eae77db28db64e5e80d0d99c60e74973f</id>
<content type='text'>
by default imlib2 doesn't check the file's timestamp to avoid disk
activity when loading from cache. however, this ends up breaking our
autoreload functionality on multi-frame images.

the reason why single frame images weren't broken was because
`img_load()` calls `imlib_image_set_changes_on_disk()`, which tells
imlib2 to check the timestamp before loading from cache.

do the same thing for the multi-frame loader as well.

additionally add a comment to img_load() explaining what's going on.

Closes: https://codeberg.org/nsxiv/nsxiv/issues/436

Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/437
Reviewed-by: eylles &lt;eylles@noreply.codeberg.org&gt;
</content>
</entry>
<entry>
<title>apply clang-format</title>
<updated>2023-03-11T12:37:04Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2023-02-10T05:35:53Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=f2f4903de4bd3ce06c03dd66f0c9a7dda97a3550'/>
<id>urn:sha1:f2f4903de4bd3ce06c03dd66f0c9a7dda97a3550</id>
<content type='text'>
minus the bogus changes

Co-authored-by: Berke Kocaoğlu &lt;berke.kocaoglu@metu.edu.tr&gt;
</content>
</entry>
<entry>
<title>make some changes prepping for clang-format</title>
<updated>2023-03-11T12:36:26Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2022-07-02T15:06:24Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=2434e83807360bfe43e3c404be12438f00a894ab'/>
<id>urn:sha1:2434e83807360bfe43e3c404be12438f00a894ab</id>
<content type='text'>
Co-authored-by: Berke Kocaoğlu &lt;berke.kocaoglu@metu.edu.tr&gt;
</content>
</entry>
<entry>
<title>update copyright year</title>
<updated>2023-01-28T10:29:36Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2023-01-15T09:26:46Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=a051ad210dc0571ec581c89171dc25b9ab35f4be'/>
<id>urn:sha1:a051ad210dc0571ec581c89171dc25b9ab35f4be</id>
<content type='text'>
</content>
</entry>
<entry>
<title>img_t: rename alpha -&gt; alpha_layer for consistency</title>
<updated>2023-01-28T10:23:11Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2023-01-17T09:57:57Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=6ffc64a04e5e4200103db9df6bd85f958a942d9f'/>
<id>urn:sha1:6ffc64a04e5e4200103db9df6bd85f958a942d9f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add cli flag --alpha-layer</title>
<updated>2023-01-28T10:23:11Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2023-01-17T09:48:59Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=1f788a318bedc0e6a83632c1f126e747c0430d6c'/>
<id>urn:sha1:1f788a318bedc0e6a83632c1f126e747c0430d6c</id>
<content type='text'>
now that we have long-opts, we don't have to worry about exhausting the
alphabet list for short-opts. so adding a cli flag to set/unset the
checker background makes sense.

ref: https://codeberg.org/nsxiv/nsxiv/issues/404
</content>
</entry>
<entry>
<title>add support for multi-frame images via imlib2 (#373)</title>
<updated>2023-01-08T10:02:56Z</updated>
<author>
<name>NRK</name>
<email>nrk@disroot.org</email>
</author>
<published>2023-01-08T10:02:56Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=76c2b81b6077702d3bbd9726b698cd8b6547fc5e'/>
<id>urn:sha1:76c2b81b6077702d3bbd9726b698cd8b6547fc5e</id>
<content type='text'>
this will be a massive change compared to the usual stuff. however the
gains will be worth it:

* we gain lots of additional animated image support.
* and we'll gain _even_ more format support as imlib2 adds them, without needing
  any change in our code-base.
* about ~300 LoC will be purged once we remove our internal gif and webp loader.

as for when to remove the internal loaders, a good time might be when debian
upgrades their imlib2, currently it seems to be at v1.7.5, which doesn't support
animated images.

as of now, nsxiv will continue to build with the internal gif/webp loaders
(assuming they were enabled in config.mk) if imlib2 version is below 1.8.0 and
will print out a deprecation notice.

and if imlib2 version supports multi-frame then it will simply ignore the
internal loaders and use the imlib2 one.

in other words, users shouldn't need to do anything on their side. everything
that previously functioned will continue to function regardless of the user's
imlib2 version (though they might see the annoying deprecation notice if the
imlib2 version doesn't support multi-frame images).

known issue:

* image loading performance can be noticeably worse in
  imlib2 versions below 1.9.0

Closes: https://codeberg.org/nsxiv/nsxiv/issues/301
Closes: https://codeberg.org/nsxiv/nsxiv/issues/300
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/373
Reviewed-by: TAAPArthur &lt;taaparthur@noreply.codeberg.org&gt;
</content>
</entry>
<entry>
<title>add brightness and contrast (#396)</title>
<updated>2022-12-22T11:21:40Z</updated>
<author>
<name>Berke Kocaoğlu</name>
<email>kberke@metu.edu.tr</email>
</author>
<published>2022-12-22T11:21:40Z</published>
<link rel='alternate' type='text/html' href='https://git.krolyxon.com/nsxiv/commit/?id=95bc9b463b87236d30d86626e1052e6979d6510f'/>
<id>urn:sha1:95bc9b463b87236d30d86626e1052e6979d6510f</id>
<content type='text'>
* Imlib2 supports modifying gamma, brightness and contrast directly
  while sxiv only supports gamma. Makes sense to extend it to brightness
  and contrast as well.

* Since color corrections need to be aware of each other, they have been
  refactored into one centralized function.

* This also makes the code more hackable as it makes it easier to add
  more color correction functions without them interfering with each
  other.

Co-authored-by: 0ion9 &lt;finticemo@gmail.com&gt;
Co-authored-by: NRK &lt;nrk@disroot.org&gt;
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/396
Reviewed-by: NRK &lt;nrk@disroot.org&gt;
Reviewed-by: TAAPArthur &lt;taaparthur@noreply.codeberg.org&gt;
Co-authored-by: Berke Kocaoğlu &lt;kberke@metu.edu.tr&gt;
Co-committed-by: Berke Kocaoğlu &lt;kberke@metu.edu.tr&gt;
</content>
</entry>
</feed>
