This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 3a23d37e9e2fc63f02435221e96cef601b5ce2ed (commit) from 177fb88927406348571117c81c0ae6ceac6b92e3 (commit)
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 ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/3a23d37e9e2fc63f02435221e96cef601b5ce...
commit 3a23d37e9e2fc63f02435221e96cef601b5ce2ed Author: Cyril Hrubis metan@ucw.cz Date: Mon Jul 15 00:46:45 2013 +0200
loaders: JPG: Fix signature matching.
The first marker in JPEG may not be the 0xff 0xc0 so this commit limits signature lenght to three bytes.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/libs/loaders/GP_JPG.c b/libs/loaders/GP_JPG.c index 0cf10f7..d7d3bf7 100644 --- a/libs/loaders/GP_JPG.c +++ b/libs/loaders/GP_JPG.c @@ -45,10 +45,10 @@
/* * 0xff 0xd8 - start of image - * 0xff 0xe0 - APP0 JFIF meta data + * 0xff 0x.. - start of frame */ -#define JPEG_SIGNATURE "xffxd8xffxe0" -#define JPEG_SIGNATURE_LEN 4 +#define JPEG_SIGNATURE "xffxd8xff" +#define JPEG_SIGNATURE_LEN 3
int GP_MatchJPG(const void *buf) { @@ -380,7 +380,7 @@ int GP_SaveJPG(const GP_Context *src, const char *dst_path,
/* fix the pixels as we want in fact BGR */ for (i = 0; i < src->w; i++) { - uint8_t *pix = tmp + 3 * i; + uint8_t *pix = tmp + 3 * i; GP_SWAP(pix[0], pix[2]); }
-----------------------------------------------------------------------
Summary of changes: libs/loaders/GP_JPG.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 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.