summaryrefslogtreecommitdiff
path: root/codec
diff options
context:
space:
mode:
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2010-03-26 16:09:46 +0000
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2010-03-26 16:09:46 +0000
commitb2d22d6bc0d04b7e661aa1e4f717428db26d0f9e (patch)
tree47a7b2442a701eb465cd830ddd3cb956c411b629 /codec
parent73b4d326382e1c7e0f10ea98cc9f1b4672aa3fb2 (diff)
Added support for "jpc" codestreams which are equivalent to "j2c" codestreams [v2.0]. Thanks to Winfried for this patch
Diffstat (limited to 'codec')
-rw-r--r--codec/image_to_j2k.c4
-rw-r--r--codec/j2k_to_image.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/codec/image_to_j2k.c b/codec/image_to_j2k.c
index 998d3782..1a7bb2ac 100644
--- a/codec/image_to_j2k.c
+++ b/codec/image_to_j2k.c
@@ -390,10 +390,10 @@ int load_images(dircnt_t *dirptr, char *imgdirpath){
int get_file_format(char *filename) {
unsigned int i;
static const char *extension[] = {
- "pgx", "pnm", "pgm", "ppm", "bmp", "tif", "raw", "tga", "j2k", "jp2", "j2c"
+ "pgx", "pnm", "pgm", "ppm", "bmp", "tif", "raw", "tga", "j2k", "jp2", "j2c", "jpc"
};
static const int format[] = {
- PGX_DFMT, PXM_DFMT, PXM_DFMT, PXM_DFMT, BMP_DFMT, TIF_DFMT, RAW_DFMT, TGA_DFMT, J2K_CFMT, JP2_CFMT, J2K_CFMT
+ PGX_DFMT, PXM_DFMT, PXM_DFMT, PXM_DFMT, BMP_DFMT, TIF_DFMT, RAW_DFMT, TGA_DFMT, J2K_CFMT, JP2_CFMT, J2K_CFMT, J2K_CFMT
};
char * ext = strrchr(filename, '.');
if (ext == NULL)
diff --git a/codec/j2k_to_image.c b/codec/j2k_to_image.c
index 8f143644..aa1eb687 100644
--- a/codec/j2k_to_image.c
+++ b/codec/j2k_to_image.c
@@ -190,8 +190,8 @@ int load_images(dircnt_t *dirptr, char *imgdirpath){
int get_file_format(char *filename) {
unsigned int i;
- static const char *extension[] = {"pgx", "pnm", "pgm", "ppm", "bmp","tif", "raw", "tga", "j2k", "jp2", "jpt", "j2c" };
- static const int format[] = { PGX_DFMT, PXM_DFMT, PXM_DFMT, PXM_DFMT, BMP_DFMT, TIF_DFMT, RAW_DFMT, TGA_DFMT, J2K_CFMT, JP2_CFMT, JPT_CFMT, J2K_CFMT };
+ static const char *extension[] = {"pgx", "pnm", "pgm", "ppm", "bmp","tif", "raw", "tga", "j2k", "jp2", "jpt", "j2c", "jpc" };
+ static const int format[] = { PGX_DFMT, PXM_DFMT, PXM_DFMT, PXM_DFMT, BMP_DFMT, TIF_DFMT, RAW_DFMT, TGA_DFMT, J2K_CFMT, JP2_CFMT, JPT_CFMT, J2K_CFMT, J2K_CFMT };
char * ext = strrchr(filename, '.');
if (ext == NULL)
return -1;