Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes in pngconvert #1051

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions doc/Doxyfile.dox.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
TYPEDEF_HIDES_STRUCT = NO
SYMBOL_CACHE_SIZE = 0
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
Expand Down Expand Up @@ -79,7 +78,6 @@ GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = NO
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
Expand Down Expand Up @@ -146,7 +144,6 @@ HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80
HTML_TIMESTAMP = NO
HTML_ALIGN_MEMBERS = YES
HTML_DYNAMIC_SECTIONS = NO
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
Expand All @@ -173,7 +170,6 @@ ECLIPSE_DOC_ID = org.doxygen.Project
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
USE_INLINE_TREES = NO
TREEVIEW_WIDTH = 250
EXT_LINKS_IN_WINDOW = NO
FORMULA_FONTSIZE = 10
Expand Down Expand Up @@ -217,8 +213,6 @@ MAN_LINKS = NO
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
Expand Down
22 changes: 15 additions & 7 deletions src/bin/jp2/convertpng.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ opj_image_t *pngtoimage(const char *read_idf, opj_cparameters_t * params)
png_uint_32 width, height = 0U;
int color_type;
FILE *reader = NULL;
OPJ_BYTE** rows = NULL;
OPJ_INT32* row32s = NULL;
OPJ_BYTE** rows;
OPJ_INT32* row32s;
/* j2k: */
opj_image_t *image = NULL;
opj_image_t *image;
opj_image_cmptparm_t cmptparm[4];
OPJ_UINT32 nr_comp;
OPJ_BYTE sigbuf[8];
Expand All @@ -94,20 +94,28 @@ opj_image_t *pngtoimage(const char *read_idf, opj_cparameters_t * params)
if (fread(sigbuf, 1, MAGIC_SIZE, reader) != MAGIC_SIZE
|| memcmp(sigbuf, PNG_MAGIC, MAGIC_SIZE) != 0) {
fprintf(stderr, "pngtoimage: %s is no valid PNG file\n", read_idf);
goto fin;
return NULL;
}

if ((png = png_create_read_struct(PNG_LIBPNG_VER_STRING,
NULL, NULL, NULL)) == NULL) {
goto fin;
fclose(reader);
return NULL;
}
if ((info = png_create_info_struct(png)) == NULL) {
goto fin;
fclose(reader);
png_destroy_read_struct(&png, NULL, NULL);
return NULL;
}

if (setjmp(png_jmpbuf(png))) {
goto fin;
png_destroy_read_struct(&png, &info, NULL);
fclose(reader);
return NULL;
}
rows = NULL;
row32s = NULL;
image = NULL;

png_init_io(png, reader);
png_set_sig_bytes(png, MAGIC_SIZE);
Expand Down