This is an automated email generated because a ref change occurred in the git repository for project gfxprim.git.
The branch, master has been updated discards 302953014e10dcef71b369e495dfb91b0fed705e (commit) discards afb3d2823c56ff76b757359c589c449252757303 (commit) discards b10281ba4c6ef9ade39e86b8c3aa42878fdff59f (commit) via 69d7c9ef5642dee09b76da64d79f5f5e474501e5 (commit) via 500eb1a9b1bc02f690025bdbcc6bde1920146ed5 (commit) via 8af53840ba1296b26bdfe86753ec1eb32ddfa1cd (commit)
This update added new revisions after undoing existing revisions. That is to say, the old revision is not a strict subset of the new revision. This situation occurs when you --force push a change and generate a repository containing something like this:
* -- * -- B -- O -- O -- O (302953014e10dcef71b369e495dfb91b0fed705e) \ N -- N -- N (69d7c9ef5642dee09b76da64d79f5f5e474501e5)
When this happens we assume that you've already had alert emails for all of the O revisions, and so we here report only the revisions in the N branch from the common base, B.
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 69d7c9ef5642dee09b76da64d79f5f5e474501e5 Author: Cyril Hrubis metan@ucw.cz Date: Mon, 23 Oct 2017 18:26:46 +0200 URL: http://repo.or.cz/gfxprim.git/69d7c9ef5642dee0
spiv: Fix image list counter
We have to add cur_file only and only if we are inside of a directory, otherwise we end up with random position.
Signed-off-by: Cyril Hrubis metan@ucw.cz --- demos/spiv/image_list.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/demos/spiv/image_list.c b/demos/spiv/image_list.c index be6532c0763e..cf1d18c09a21 100644 --- a/demos/spiv/image_list.c +++ b/demos/spiv/image_list.c @@ -360,6 +360,9 @@ unsigned int image_list_count(struct image_list *self)
unsigned int image_list_pos(struct image_list *self) { + if (!self->in_dir) + return count_img_to(self, self->cur_arg); + return count_img_to(self, self->cur_arg) + self->cur_file; }
commit 500eb1a9b1bc02f690025bdbcc6bde1920146ed5 Author: Cyril Hrubis metan@ucw.cz Date: Mon, 23 Oct 2017 14:15:48 +0200 URL: http://repo.or.cz/gfxprim.git/500eb1a9b1bc02f6
loaders: PNG: Wire up gamma tables.
Now the loader at least tries to set the gamma value for the pixmap, which is later used by some of the resampling functions, etc.
Signed-off-by: Cyril Hrubis metan@ucw.cz --- libs/loaders/GP_PNG.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/libs/loaders/GP_PNG.c b/libs/loaders/GP_PNG.c index fa01db1c5939..d0191cf5f103 100644 --- a/libs/loaders/GP_PNG.c +++ b/libs/loaders/GP_PNG.c @@ -196,6 +196,9 @@ static int read_convert_bitmap(GP_Pixmap *res, GP_ProgressCallback *callback,
unsigned int y;
+ if (gamma < 0.01) + GP_PixmapSetGamma(res, 2.2); + for (y = 0; y < res->h; y++) { png_read_row(png, (void*)row, NULL); uint8_t *rrow = GP_PIXEL_ADDR(res, 0, y); @@ -385,6 +388,9 @@ int GP_ReadPNGEx(GP_IO *io, GP_Pixmap **img, goto err2; }
+ if (gamma > 0.1) + GP_PixmapSetGamma(res, 1/gamma); + if (color_type == PNG_COLOR_TYPE_GRAY && depth < 8) png_set_packswap(png);
commit 8af53840ba1296b26bdfe86753ec1eb32ddfa1cd Author: Cyril Hrubis metan@ucw.cz Date: Mon, 23 Oct 2017 13:52:39 +0200 URL: http://repo.or.cz/gfxprim.git/8af53840ba1296b2
core: GP_Pixmap: Add GP_PixmapSetGamma() function
Signed-off-by: Cyril Hrubis metan@ucw.cz --- build/syms/Core_symbols.txt | 1 + include/core/GP_Pixmap.h | 5 +++++ libs/core/GP_Gamma.c | 7 ++++++- libs/core/GP_Pixmap.c | 9 +++++++++ 4 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/build/syms/Core_symbols.txt b/build/syms/Core_symbols.txt index 7ee4ff213aff..b49ab7670191 100644 --- a/build/syms/Core_symbols.txt +++ b/build/syms/Core_symbols.txt @@ -2,6 +2,7 @@ GP_PixelTypes GP_PixelHasFlags
GP_PixmapAlloc +GP_PixmapSetGamma GP_PixmapResize GP_PixmapConvertAlloc GP_PixmapPrintInfo diff --git a/include/core/GP_Pixmap.h b/include/core/GP_Pixmap.h index f67e6ec2f9d6..d599fbe792eb 100644 --- a/include/core/GP_Pixmap.h +++ b/include/core/GP_Pixmap.h @@ -111,6 +111,11 @@ typedef struct GP_Pixmap { GP_Pixmap *GP_PixmapAlloc(GP_Size w, GP_Size h, GP_PixelType type);
/* + * Sets gamma for the pixmap. + */ +int GP_PixmapSetGamma(GP_Pixmap *self, float gamma); + +/* * Free pixmap. * * If pixmap->free_pixels, also free pixel data. diff --git a/libs/core/GP_Gamma.c b/libs/core/GP_Gamma.c index 05500f9a0c36..26286b03f43a 100644 --- a/libs/core/GP_Gamma.c +++ b/libs/core/GP_Gamma.c @@ -186,7 +186,12 @@ GP_Gamma *GP_GammaCopy(GP_Gamma *self)
void GP_GammaRelease(GP_Gamma *self) { - int channels = GP_PixelTypes[self->pixel_type].numchannels, i; + int channels, i; + + if (!self) + return; + + channels = GP_PixelTypes[self->pixel_type].numchannels;
GP_DEBUG(1, "Releasing Gamma table %s gamma %f", GP_PixelTypeName(self->pixel_type), self->tables[0]->gamma);
diff --git a/libs/core/GP_Pixmap.c b/libs/core/GP_Pixmap.c index 53c289e1c007..72dbae21fd13 100644 --- a/libs/core/GP_Pixmap.c +++ b/libs/core/GP_Pixmap.c @@ -114,6 +114,15 @@ GP_Pixmap *GP_PixmapAlloc(GP_Size w, GP_Size h, GP_PixelType type) return pixmap; }
+int GP_PixmapSetGamma(GP_Pixmap *self, float gamma) +{ + GP_GammaRelease(self->gamma); + + self->gamma = GP_GammaAcquire(self->pixel_type, gamma); + + return !self->gamma; +} + void GP_PixmapFree(GP_Pixmap *pixmap) { GP_DEBUG(1, "Freeing pixmap (%p)", pixmap);
-----------------------------------------------------------------------
Summary of changes: demos/spiv/spiv.c | 2 +- libs/core/GP_Gamma.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.