[GM-commit] GraphicsMagick: 2 new changesets
Swiss army knife of image processing
Brought to you by:
bfriesen
From: GraphicsMagick C. <gra...@li...> - 2015-09-19 20:37:46
|
changeset 1ab8dafa396f in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=1ab8dafa396f summary: Fix conversion warnings in WIN64 build. changeset eda4a6f505f6 in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=eda4a6f505f6 summary: Fix conversion warnings in WIN64 build. diffstat: coders/dcm.c | 2 +- coders/jp2.c | 4 ++-- coders/jpeg.c | 13 ++++++++----- coders/mat.c | 4 ++-- coders/meta.c | 2 +- coders/pdb.c | 6 ++++-- coders/ps.c | 4 ++-- coders/ps2.c | 4 ++-- coders/ps3.c | 4 ++-- coders/rle.c | 8 ++++++-- coders/tim.c | 8 +++++--- coders/viff.c | 8 ++++++-- wmf/src/meta.c | 2 +- 13 files changed, 42 insertions(+), 27 deletions(-) diffs (266 lines): diff -r eb38374b3c56 -r eda4a6f505f6 coders/dcm.c --- a/coders/dcm.c Sat Sep 19 11:58:24 2015 -0500 +++ b/coders/dcm.c Sat Sep 19 15:36:16 2015 -0500 @@ -281,7 +281,7 @@ Array holding information on DICOM elements */ static const DicomInfo - const dicom_info[]= + dicom_info[]= { { 0x0000, 0x0000, "UL", "Group Length", (DicomElemParseFunc *) NULL }, { 0x0000, 0x0001, "UL", "Command Length to End", (DicomElemParseFunc *) NULL }, diff -r eb38374b3c56 -r eda4a6f505f6 coders/jp2.c --- a/coders/jp2.c Sat Sep 19 11:58:24 2015 -0500 +++ b/coders/jp2.c Sat Sep 19 15:36:16 2015 -0500 @@ -87,7 +87,7 @@ #endif static MagickBool jasper_initialized=MagickFalse; -static const char const * const jasper_options[] = +static const char * const jasper_options[] = { "imgareatlx", "imgareatly", @@ -1108,7 +1108,7 @@ */ { const char - const * const * option_name; + * const * option_name; for (option_name = jasper_options; *option_name != NULL; option_name++) { diff -r eb38374b3c56 -r eda4a6f505f6 coders/jpeg.c --- a/coders/jpeg.c Sat Sep 19 11:58:24 2015 -0500 +++ b/coders/jpeg.c Sat Sep 19 15:36:16 2015 -0500 @@ -1787,16 +1787,19 @@ const size_t profile_length) { size_t - remaining, count, index, - header_length, - marker_length, - total_length; + header_length, + total_length; + + unsigned int + marker_length, + remaining; header_length=strlen(xmp_std_header)+1; /* Include terminating null */ total_length=header_length+profile_length; - remaining=total_length; + /* XMP profile must be no larger than range of 'unsigned int' */ + remaining=(unsigned int) Min(UINT_MAX,total_length); marker_length=Min(remaining,JPEG_MARKER_MAX_SIZE); jpeg_write_m_header(jpeg_info,XML_MARKER,marker_length); diff -r eb38374b3c56 -r eda4a6f505f6 coders/mat.c --- a/coders/mat.c Sat Sep 19 11:58:24 2015 -0500 +++ b/coders/mat.c Sat Sep 19 15:36:16 2015 -0500 @@ -85,8 +85,8 @@ } MATHeader; -static const char const *const MonthsTab[12]={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"}; -static const char const *const DayOfWTab[7]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"}; +static const char *MonthsTab[12]={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"}; +static const char *DayOfWTab[7]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"}; static const char *OsDesc= #ifdef __WIN32__ "PCWIN"; diff -r eb38374b3c56 -r eda4a6f505f6 coders/meta.c --- a/coders/meta.c Sat Sep 19 11:58:24 2015 -0500 +++ b/coders/meta.c Sat Sep 19 15:36:16 2015 -0500 @@ -1786,7 +1786,7 @@ *name; } tag_spec; -static const tag_spec const tags[] = { +static const tag_spec tags[] = { { 5, "Image Name" }, { 7, "Edit Status" }, { 10, "Priority" }, diff -r eb38374b3c56 -r eda4a6f505f6 coders/pdb.c --- a/coders/pdb.c Sat Sep 19 11:58:24 2015 -0500 +++ b/coders/pdb.c Sat Sep 19 15:36:16 2015 -0500 @@ -355,7 +355,7 @@ bits_per_pixel, status; - unsigned long + size_t packets; /* @@ -792,9 +792,11 @@ packet_size, status; + size_t + packets; + unsigned long literal, - packets, repeat; const ImageAttribute diff -r eb38374b3c56 -r eda4a6f505f6 coders/ps.c --- a/coders/ps.c Sat Sep 19 11:58:24 2015 -0500 +++ b/coders/ps.c Sat Sep 19 15:36:16 2015 -0500 @@ -621,7 +621,7 @@ static unsigned int WritePSImage(const ImageInfo *image_info,Image *image) { static const char - const * const PostscriptProlog[]= + * const PostscriptProlog[]= { "%%BeginProlog", "%", @@ -887,7 +887,7 @@ page_geometry[MaxTextExtent]; const char - const * const *q; + * const *q; const ImageAttribute *attribute; diff -r eb38374b3c56 -r eda4a6f505f6 coders/ps2.c --- a/coders/ps2.c Sat Sep 19 11:58:24 2015 -0500 +++ b/coders/ps2.c Sat Sep 19 15:36:16 2015 -0500 @@ -316,7 +316,7 @@ static unsigned int WritePS2Image(const ImageInfo *image_info,Image *image) { static const char - const * const PostscriptProlog[]= + * const PostscriptProlog[]= { "%%%%BeginProlog", "%%", @@ -477,7 +477,7 @@ **labels; const char - const * const *q; + * const *q; CompressionType compression; diff -r eb38374b3c56 -r eda4a6f505f6 coders/ps3.c --- a/coders/ps3.c Sat Sep 19 11:58:24 2015 -0500 +++ b/coders/ps3.c Sat Sep 19 15:36:16 2015 -0500 @@ -974,7 +974,7 @@ static unsigned int WritePS3Image(const ImageInfo *image_info,Image *image) { static const char - const * const PostscriptProlog[]= + * const PostscriptProlog[]= { "/ByteStreamDecodeFilter", "{", @@ -1194,7 +1194,7 @@ **labels; const char - const * const *q; + * const *q; CompressionType compression; diff -r eb38374b3c56 -r eda4a6f505f6 coders/rle.c --- a/coders/rle.c Sat Sep 19 11:58:24 2015 -0500 +++ b/coders/rle.c Sat Sep 19 15:36:16 2015 -0500 @@ -215,7 +215,9 @@ status; unsigned int - colormap_entries, + colormap_entries; + + unsigned int index; unsigned long @@ -237,7 +239,9 @@ *p; size_t - count, + count; + + unsigned int map_length; unsigned char diff -r eb38374b3c56 -r eda4a6f505f6 coders/tim.c --- a/coders/tim.c Sat Sep 19 11:58:24 2015 -0500 +++ b/coders/tim.c Sat Sep 19 15:36:16 2015 -0500 @@ -123,10 +123,12 @@ unsigned int status; + size_t + bytes_per_line, + image_size; + unsigned long - bytes_per_line, height, - image_size, pixel_mode, width; @@ -209,7 +211,7 @@ height=ReadBlobLSBShort(image); image_size=MagickArraySize(2,MagickArraySize(width,height)); bytes_per_line=MagickArraySize(width,2); - width=(MagickArraySize(width,16))/bits_per_pixel; + width=(unsigned long)(MagickArraySize(width,16))/bits_per_pixel; /* Initialize image structure. */ diff -r eb38374b3c56 -r eda4a6f505f6 coders/viff.c --- a/coders/viff.c Sat Sep 19 11:58:24 2015 -0500 +++ b/coders/viff.c Sat Sep 19 15:36:16 2015 -0500 @@ -296,7 +296,9 @@ unsigned long bytes_per_pixel, - lsb_first, + lsb_first; + + size_t max_packets, number_pixels; @@ -957,9 +959,11 @@ unsigned long number_pixels, - packets, scene; + size_t + packets; + ViffInfo viff_info; diff -r eb38374b3c56 -r eda4a6f505f6 wmf/src/meta.c --- a/wmf/src/meta.c Sat Sep 19 11:58:24 2015 -0500 +++ b/wmf/src/meta.c Sat Sep 19 15:36:16 2015 -0500 @@ -302,7 +302,7 @@ } void wmf_write_begin (wmfAPI * API, const char * filename) -{ int length; +{ size_t length; wmfWriteFileInfo * WFI = (wmfWriteFileInfo *) wmf_malloc (API, sizeof(wmfWriteFileInfo)); |