summaryrefslogtreecommitdiff
path: root/plugins/FreeImage
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-20 17:00:14 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-20 17:00:14 +0000
commit30ab6ceb71842f003f649b3d62b89af010cf40d1 (patch)
treeb1dae7a6d545cdf622a165ba4c576d3a41d71221 /plugins/FreeImage
parent65461e7b4edb683cc09086fdaf49e0c2ef918bd4 (diff)
- direct call of MS_SKIN_ADDNEWSOUND replaced with Skin_AddSound() call;
- obsolete structure SKINSOUNDDESC removed - dynamically translated hot keys; - checked correct LPGEN'ing of the sounds creation; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@500 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FreeImage')
-rw-r--r--plugins/FreeImage/Miranda/main.cpp4
-rw-r--r--plugins/FreeImage/Source/FreeImage/BitmapAccess.cpp10
-rw-r--r--plugins/FreeImage/Source/FreeImage/ColorLookup.cpp4
-rw-r--r--plugins/FreeImage/Source/FreeImage/Conversion8.cpp2
-rw-r--r--plugins/FreeImage/Source/FreeImage/FreeImage.cpp2
-rw-r--r--plugins/FreeImage/Source/FreeImage/Halftoning.cpp2
-rw-r--r--plugins/FreeImage/Source/FreeImage/PluginBMP.cpp10
-rw-r--r--plugins/FreeImage/Source/FreeImage/PluginGIF.cpp54
-rw-r--r--plugins/FreeImage/Source/FreeImage/PluginICO.cpp2
-rw-r--r--plugins/FreeImage/Source/FreeImage/PluginJPEG.cpp2
-rw-r--r--plugins/FreeImage/Source/FreeImage/tmoColorConvert.cpp12
-rw-r--r--plugins/FreeImage/Source/FreeImage/tmoFattal02.cpp2
-rw-r--r--plugins/FreeImage/Source/FreeImage/tmoReinhard05.cpp4
-rw-r--r--plugins/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp4
-rw-r--r--plugins/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp2
-rw-r--r--plugins/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp2
-rw-r--r--plugins/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp8
-rw-r--r--plugins/FreeImage/Source/LibJPEG/jcparam.c2
-rw-r--r--plugins/FreeImage/Source/LibPNG/png.c4
-rw-r--r--plugins/FreeImage/Source/LibPNG/pngconf.h4
-rw-r--r--plugins/FreeImage/Source/LibPNG/pngpriv.h4
-rw-r--r--plugins/FreeImage/Source/LibPNG/pngrtran.c2
22 files changed, 71 insertions, 71 deletions
diff --git a/plugins/FreeImage/Miranda/main.cpp b/plugins/FreeImage/Miranda/main.cpp
index 32b5e7a0e6..39befac6e8 100644
--- a/plugins/FreeImage/Miranda/main.cpp
+++ b/plugins/FreeImage/Miranda/main.cpp
@@ -419,7 +419,7 @@ unsigned __stdcall fiio_mem_WriteProc(void *buffer, unsigned size, unsigned coun
void *newdata;
long newdatalen;
//double the data block size if we need to
- while( FIIOMEM(curpos)+(long)(size*count) >= FIIOMEM(datalen) ) {
+ while( FIIOMEM(curpos)+(long)(size*count) >= FIIOMEM(datalen)) {
//if we are at or above 1G, we cant double without going negative
if ( FIIOMEM(datalen) & 0x40000000 ) {
//max 2G
@@ -443,7 +443,7 @@ unsigned __stdcall fiio_mem_WriteProc(void *buffer, unsigned size, unsigned coun
}
memcpy( (char *)FIIOMEM(data) + FIIOMEM(curpos), buffer, size*count );
FIIOMEM(curpos) += size*count;
- if ( FIIOMEM(curpos) > FIIOMEM(filelen) ) {
+ if ( FIIOMEM(curpos) > FIIOMEM(filelen)) {
FIIOMEM(filelen) = FIIOMEM(curpos);
}
return count;
diff --git a/plugins/FreeImage/Source/FreeImage/BitmapAccess.cpp b/plugins/FreeImage/Source/FreeImage/BitmapAccess.cpp
index d87658c24f..584870f359 100644
--- a/plugins/FreeImage/Source/FreeImage/BitmapAccess.cpp
+++ b/plugins/FreeImage/Source/FreeImage/BitmapAccess.cpp
@@ -939,7 +939,7 @@ FreeImage_FindFirstMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag
// get the metadata model
METADATAMAP *metadata = ((FREEIMAGEHEADER *)dib->data)->metadata;
TAGMAP *tagmap = NULL;
- if ( (*metadata).find(model) != (*metadata).end() ) {
+ if ( (*metadata).find(model) != (*metadata).end()) {
tagmap = (*metadata)[model];
}
if(tagmap) {
@@ -1034,7 +1034,7 @@ FreeImage_CloneMetadata(FIBITMAP *dst, FIBITMAP *src) {
TAGMAP *src_tagmap = (*i).second;
if(src_tagmap) {
- if ( dst_metadata->find(model) != dst_metadata->end() ) {
+ if ( dst_metadata->find(model) != dst_metadata->end()) {
// destroy dst model
FreeImage_SetMetadata((FREE_IMAGE_MDMODEL)model, dst, NULL, NULL);
}
@@ -1168,11 +1168,11 @@ FreeImage_GetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key,
METADATAMAP *metadata = ((FREEIMAGEHEADER *)dib->data)->metadata;
if (!(*metadata).empty()) {
METADATAMAP::iterator model_iterator = metadata->find(model);
- if (model_iterator != metadata->end() ) {
+ if (model_iterator != metadata->end()) {
// this model exists : try to get the requested tag
tagmap = model_iterator->second;
TAGMAP::iterator tag_iterator = tagmap->find(key);
- if (tag_iterator != tagmap->end() ) {
+ if (tag_iterator != tagmap->end()) {
// get the requested tag
*tag = tag_iterator->second;
}
@@ -1193,7 +1193,7 @@ FreeImage_GetMetadataCount(FREE_IMAGE_MDMODEL model, FIBITMAP *dib) {
// get the metadata model
METADATAMAP *metadata = ((FREEIMAGEHEADER *)dib->data)->metadata;
- if ( (*metadata).find(model) != (*metadata).end() ) {
+ if ( (*metadata).find(model) != (*metadata).end()) {
tagmap = (*metadata)[model];
}
if (!tagmap) {
diff --git a/plugins/FreeImage/Source/FreeImage/ColorLookup.cpp b/plugins/FreeImage/Source/FreeImage/ColorLookup.cpp
index 5f677eee5c..3e81abdb95 100644
--- a/plugins/FreeImage/Source/FreeImage/ColorLookup.cpp
+++ b/plugins/FreeImage/Source/FreeImage/ColorLookup.cpp
@@ -568,7 +568,7 @@ FreeImage_LookupX11Color(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nB
if ( (szColor[0] == 'g' || szColor[0] == 'G') &&
(szColor[1] == 'r' || szColor[1] == 'R') &&
(szColor[2] == 'e' || szColor[2] == 'E' || szColor[2] == 'a' || szColor[2] == 'A' ) &&
- (szColor[3] == 'y' || szColor[3] == 'Y' ) ) {
+ (szColor[3] == 'y' || szColor[3] == 'Y' )) {
// grey<num>, or gray<num>, num 1...100
i = strtol(szColor+4, NULL, 10);
@@ -762,7 +762,7 @@ FreeImage_LookupSVGColor(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nB
if ( (szColor[0] == 'g' || szColor[0] == 'G') &&
(szColor[1] == 'r' || szColor[1] == 'R') &&
(szColor[2] == 'e' || szColor[2] == 'E' || szColor[2] == 'a' || szColor[2] == 'A' ) &&
- (szColor[3] == 'y' || szColor[3] == 'Y' ) ) {
+ (szColor[3] == 'y' || szColor[3] == 'Y' )) {
// grey<num>, or gray<num>, num 1...100
i = strtol(szColor+4, NULL, 10);
diff --git a/plugins/FreeImage/Source/FreeImage/Conversion8.cpp b/plugins/FreeImage/Source/FreeImage/Conversion8.cpp
index 2eaeb94671..867cf756ed 100644
--- a/plugins/FreeImage/Source/FreeImage/Conversion8.cpp
+++ b/plugins/FreeImage/Source/FreeImage/Conversion8.cpp
@@ -279,7 +279,7 @@ FreeImage_ConvertToGreyscale(FIBITMAP *dib) {
// allocate a 24-bit buffer
- BYTE *buffer = (BYTE*)malloc( CalculatePitch(CalculateLine(width, 24)) * sizeof(BYTE) );
+ BYTE *buffer = (BYTE*)malloc( CalculatePitch(CalculateLine(width, 24)) * sizeof(BYTE));
if(NULL == buffer) {
FreeImage_Unload(new_dib);
return NULL;
diff --git a/plugins/FreeImage/Source/FreeImage/FreeImage.cpp b/plugins/FreeImage/Source/FreeImage/FreeImage.cpp
index 2de6077eed..b36f10aca1 100644
--- a/plugins/FreeImage/Source/FreeImage/FreeImage.cpp
+++ b/plugins/FreeImage/Source/FreeImage/FreeImage.cpp
@@ -132,7 +132,7 @@ FreeImage_OutputMessageProc(int fif, const char *fmt, ...) {
// check the length of the format string
- int str_length = (int)( (strlen(fmt) > MSG_SIZE) ? MSG_SIZE : strlen(fmt) );
+ int str_length = (int)( (strlen(fmt) > MSG_SIZE) ? MSG_SIZE : strlen(fmt));
// parse the format string and put the result in 'message'
diff --git a/plugins/FreeImage/Source/FreeImage/Halftoning.cpp b/plugins/FreeImage/Source/FreeImage/Halftoning.cpp
index 82df9b607b..1542fc9268 100644
--- a/plugins/FreeImage/Source/FreeImage/Halftoning.cpp
+++ b/plugins/FreeImage/Source/FreeImage/Halftoning.cpp
@@ -176,7 +176,7 @@ static FIBITMAP* OrderedDispersedDot(FIBITMAP *dib, int order) {
BYTE *matrix = (BYTE*)malloc(l*l * sizeof(BYTE));
for(int i = 0; i < l*l; i++) {
// according to "Purdue University: Digital Image Processing Laboratory: Image Halftoning, April 30th, 2006
- matrix[i] = (BYTE)( 255 * (((double)dithervalue(i / l, i % l, order) + 0.5) / (l*l)) );
+ matrix[i] = (BYTE)( 255 * (((double)dithervalue(i / l, i % l, order) + 0.5) / (l*l)));
}
// perform the dithering
diff --git a/plugins/FreeImage/Source/FreeImage/PluginBMP.cpp b/plugins/FreeImage/Source/FreeImage/PluginBMP.cpp
index 2d8d6e0b4a..d69336f3f5 100644
--- a/plugins/FreeImage/Source/FreeImage/PluginBMP.cpp
+++ b/plugins/FreeImage/Source/FreeImage/PluginBMP.cpp
@@ -520,7 +520,7 @@ LoadWindowsBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bit
switch (compression) {
case BI_RGB :
- if ( LoadPixelData(io, handle, dib, height, pitch, bit_count) ) {
+ if ( LoadPixelData(io, handle, dib, height, pitch, bit_count)) {
return dib;
} else {
throw "Error encountered while decoding BMP data";
@@ -528,7 +528,7 @@ LoadWindowsBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bit
break;
case BI_RLE4 :
- if ( LoadPixelDataRLE4(io, handle, width, height, dib) ) {
+ if ( LoadPixelDataRLE4(io, handle, width, height, dib)) {
return dib;
} else {
throw "Error encountered while decoding RLE4 BMP data";
@@ -536,7 +536,7 @@ LoadWindowsBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bit
break;
case BI_RLE8 :
- if ( LoadPixelDataRLE8(io, handle, width, height, dib) ) {
+ if ( LoadPixelDataRLE8(io, handle, width, height, dib)) {
return dib;
} else {
throw "Error encountered while decoding RLE8 BMP data";
@@ -747,7 +747,7 @@ LoadOS22XBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bits_
return dib;
case BI_RLE4 :
- if ( LoadPixelDataRLE4(io, handle, width, height, dib) ) {
+ if ( LoadPixelDataRLE4(io, handle, width, height, dib)) {
return dib;
} else {
throw "Error encountered while decoding RLE4 BMP data";
@@ -755,7 +755,7 @@ LoadOS22XBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bits_
break;
case BI_RLE8 :
- if ( LoadPixelDataRLE8(io, handle, width, height, dib) ) {
+ if ( LoadPixelDataRLE8(io, handle, width, height, dib)) {
return dib;
} else {
throw "Error encountered while decoding RLE8 BMP data";
diff --git a/plugins/FreeImage/Source/FreeImage/PluginGIF.cpp b/plugins/FreeImage/Source/FreeImage/PluginGIF.cpp
index bf7c2550ae..7af1d821d8 100644
--- a/plugins/FreeImage/Source/FreeImage/PluginGIF.cpp
+++ b/plugins/FreeImage/Source/FreeImage/PluginGIF.cpp
@@ -167,7 +167,7 @@ FreeImage_SetMetadataEx(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key
static BOOL
FreeImage_GetMetadataEx(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FREE_IMAGE_MDTYPE type, FITAG **tag)
{
- if ( FreeImage_GetMetadata(model, dib, key, tag) ) {
+ if ( FreeImage_GetMetadata(model, dib, key, tag)) {
if ( FreeImage_GetTagType(*tag) == type ) {
return TRUE;
}
@@ -304,7 +304,7 @@ bool StringTable::Compress(BYTE *buf, int *len)
m_strmap[nextprefix] = m_nextCode;
//increment the next highest valid code, increase the code size
- if ( m_nextCode == (1 << m_codeSize) ) {
+ if ( m_nextCode == (1 << m_codeSize)) {
m_codeSize++;
}
m_nextCode++;
@@ -321,7 +321,7 @@ bool StringTable::Compress(BYTE *buf, int *len)
}
//increment to the next pixel
- if ( m_bufferShift > 0 && !(m_bufferPos + 1 == m_bufferSize && m_bufferShift <= m_slack) ) {
+ if ( m_bufferShift > 0 && !(m_bufferPos + 1 == m_bufferSize && m_bufferShift <= m_slack)) {
m_bufferShift -= m_bpp;
} else {
m_bufferPos++;
@@ -341,7 +341,7 @@ bool StringTable::Compress(BYTE *buf, int *len)
m_prefix = ch & 0x000FF;
//increment to the next pixel
- if ( m_bufferShift > 0 && !(m_bufferPos + 1 == m_bufferSize && m_bufferShift <= m_slack) ) {
+ if ( m_bufferShift > 0 && !(m_bufferPos + 1 == m_bufferSize && m_bufferShift <= m_slack)) {
m_bufferShift -= m_bpp;
} else {
m_bufferPos++;
@@ -391,7 +391,7 @@ bool StringTable::Decompress(BYTE *buf, int *len)
m_strings[m_nextCode] = m_strings[m_oldCode] + m_strings[code == m_nextCode ? m_oldCode : code][0];
}
- if ( (int)m_strings[code].size() > *len - (bufpos - buf) ) {
+ if ( (int)m_strings[code].size() > *len - (bufpos - buf)) {
//out of space, stuff the code back in for next time
m_partial <<= m_codeSize;
m_partialSize += m_codeSize;
@@ -497,7 +497,7 @@ Validate(FreeImageIO *io, fi_handle handle) {
}
BOOL bResult = FALSE;
- if ( !strncmp(buf, "GIF", 3) ) {
+ if ( !strncmp(buf, "GIF", 3)) {
if ( buf[3] >= '0' && buf[3] <= '9' && buf[4] >= '0' && buf[4] <= '9' && buf[5] >= 'a' && buf[5] <= 'z' ) {
bResult = TRUE;
}
@@ -537,7 +537,7 @@ Open(FreeImageIO *io, fi_handle handle, BOOL read) {
if ( read ) {
try {
//Header
- if ( !Validate(io, handle) ) {
+ if ( !Validate(io, handle)) {
throw FI_MSG_ERROR_MAGIC_NUMBER;
}
io->seek_proc(handle, 6, SEEK_CUR);
@@ -666,7 +666,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) {
if ( page == -1 ) {
page = 0;
}
- if ( page < 0 || page >= (int)info->image_descriptor_offsets.size() ) {
+ if ( page < 0 || page >= (int)info->image_descriptor_offsets.size()) {
return NULL;
}
@@ -787,7 +787,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) {
if ( pagedib != NULL ) {
RGBQUAD *pal = FreeImage_GetPalette(pagedib);
have_transparent = false;
- if ( FreeImage_IsTransparent(pagedib) ) {
+ if ( FreeImage_IsTransparent(pagedib)) {
int count = FreeImage_GetTransparencyCount(pagedib);
BYTE *table = FreeImage_GetTransparencyTable(pagedib);
for ( int i = 0; i < count; i++ ) {
@@ -814,7 +814,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) {
//copy frame time
if ( page == end ) {
FITAG *tag;
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, pagedib, "FrameTime", FIDT_LONG, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, pagedib, "FrameTime", FIDT_LONG, &tag)) {
delay_time = *(LONG *)FreeImage_GetTagValue(tag);
}
}
@@ -915,7 +915,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) {
while( b ) {
io->read_proc(stringtable->FillInputBuffer(b), b, 1, handle);
int size = sizeof(buf);
- while( stringtable->Decompress(buf, &size) ) {
+ while( stringtable->Decompress(buf, &size)) {
for ( int i = 0; i < size; i++ ) {
scanline[xpos] |= (buf[i] & mask) << shift;
if ( shift > 0 ) {
@@ -989,7 +989,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) {
if ( b == 11 ) { //All AEs start with an 11 byte sub-block to determine what type of AE it is
char buf[11];
io->read_proc(buf, 11, 1, handle);
- if ( !memcmp(buf, "NETSCAPE2.0", 11) || !memcmp(buf, "ANIMEXTS1.0", 11) ) { //Not everybody recognizes ANIMEXTS1.0 but it is valid
+ if ( !memcmp(buf, "NETSCAPE2.0", 11) || !memcmp(buf, "ANIMEXTS1.0", 11)) { //Not everybody recognizes ANIMEXTS1.0 but it is valid
io->read_proc(&b, 1, 1, handle);
if ( b == 3 ) { //we're supposed to have a 3 byte sub-block now
io->read_proc(&b, 1, 1, handle); //this should be 0x01 but isn't really important
@@ -1089,22 +1089,22 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
int disposal_method = GIF_DISPOSAL_BACKGROUND, delay_time = 100, transparent_color = 0;
WORD left = 0, top = 0, width = (WORD)FreeImage_GetWidth(dib), height = (WORD)FreeImage_GetHeight(dib);
WORD output_height = height;
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameLeft", FIDT_SHORT, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameLeft", FIDT_SHORT, &tag)) {
left = *(WORD *)FreeImage_GetTagValue(tag);
}
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameTop", FIDT_SHORT, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameTop", FIDT_SHORT, &tag)) {
top = *(WORD *)FreeImage_GetTagValue(tag);
}
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "NoLocalPalette", FIDT_BYTE, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "NoLocalPalette", FIDT_BYTE, &tag)) {
no_local_palette = *(BYTE *)FreeImage_GetTagValue(tag) ? true : false;
}
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "Interlaced", FIDT_BYTE, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "Interlaced", FIDT_BYTE, &tag)) {
interlaced = *(BYTE *)FreeImage_GetTagValue(tag) ? true : false;
}
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameTime", FIDT_LONG, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameTime", FIDT_LONG, &tag)) {
delay_time = *(LONG *)FreeImage_GetTagValue(tag);
}
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "DisposalMethod", FIDT_BYTE, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "DisposalMethod", FIDT_BYTE, &tag)) {
disposal_method = *(BYTE *)FreeImage_GetTagValue(tag);
}
@@ -1119,14 +1119,14 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
if ( page == 0 ) {
//gather some info
WORD logicalwidth = width; // width has already been swapped...
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "LogicalWidth", FIDT_SHORT, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "LogicalWidth", FIDT_SHORT, &tag)) {
logicalwidth = *(WORD *)FreeImage_GetTagValue(tag);
#ifdef FREEIMAGE_BIGENDIAN
SwapShort(&logicalwidth);
#endif
}
WORD logicalheight = height; // height has already been swapped...
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "LogicalHeight", FIDT_SHORT, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "LogicalHeight", FIDT_SHORT, &tag)) {
logicalheight = *(WORD *)FreeImage_GetTagValue(tag);
#ifdef FREEIMAGE_BIGENDIAN
SwapShort(&logicalheight);
@@ -1134,7 +1134,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
}
RGBQUAD *globalpalette = NULL;
int globalpalette_size = 0;
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "GlobalPalette", FIDT_PALETTE, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "GlobalPalette", FIDT_PALETTE, &tag)) {
globalpalette_size = FreeImage_GetTagCount(tag);
if ( globalpalette_size >= 2 ) {
globalpalette = (RGBQUAD *)FreeImage_GetTagValue(tag);
@@ -1174,7 +1174,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
globalpalette_size = 256;
packed |= 7 & GIF_PACKED_LSD_GCTSIZE;
}
- if ( FreeImage_GetBackgroundColor(dib, &background_color) ) {
+ if ( FreeImage_GetBackgroundColor(dib, &background_color)) {
for ( int i = 0; i < globalpalette_size; i++ ) {
if ( background_color.rgbRed == globalpalette[i].rgbRed &&
background_color.rgbGreen == globalpalette[i].rgbGreen &&
@@ -1206,7 +1206,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
//Application Extension
LONG loop = 0;
- if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "Loop", FIDT_LONG, &tag) ) {
+ if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "Loop", FIDT_LONG, &tag)) {
loop = *(LONG *)FreeImage_GetTagValue(tag);
}
if ( loop != 1 ) {
@@ -1250,7 +1250,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
}
//Graphic Control Extension
- if ( FreeImage_IsTransparent(dib) ) {
+ if ( FreeImage_IsTransparent(dib)) {
int count = FreeImage_GetTransparencyCount(dib);
BYTE *table = FreeImage_GetTransparencyTable(dib);
for ( int i = 0; i < count; i++ ) {
@@ -1316,9 +1316,9 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
b = sizeof(buf);
while( y < output_height ) {
memcpy(stringtable->FillInputBuffer(line), FreeImage_GetScanLine(dib, output_height - y - 1), line);
- while( stringtable->Compress(bufptr, &size) ) {
+ while( stringtable->Compress(bufptr, &size)) {
bufptr += size;
- if ( bufptr - buf == sizeof(buf) ) {
+ if ( bufptr - buf == sizeof(buf)) {
io->write_proc(&b, 1, 1, handle);
io->write_proc(buf, sizeof(buf), 1, handle);
size = sizeof(buf);
@@ -1339,7 +1339,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
size = (int)(bufptr - buf);
BYTE last[4];
w = (WORD)stringtable->CompressEnd(last);
- if ( size + w >= sizeof(buf) ) {
+ if ( size + w >= sizeof(buf)) {
//one last full size sub-block
io->write_proc(&b, 1, 1, handle);
io->write_proc(buf, size, 1, handle);
diff --git a/plugins/FreeImage/Source/FreeImage/PluginICO.cpp b/plugins/FreeImage/Source/FreeImage/PluginICO.cpp
index 1107841d33..d0ece3514c 100644
--- a/plugins/FreeImage/Source/FreeImage/PluginICO.cpp
+++ b/plugins/FreeImage/Source/FreeImage/PluginICO.cpp
@@ -100,7 +100,7 @@ CalculateImageOffset(std::vector<FIBITMAP*>& vPages, int nIndex ) {
// calculate the ICO header size
dwSize = sizeof(ICONHEADER);
// add the ICONDIRENTRY's
- dwSize += (DWORD)( vPages.size() * sizeof(ICONDIRENTRY) );
+ dwSize += (DWORD)( vPages.size() * sizeof(ICONDIRENTRY));
// add the sizes of the previous images
for(int k = 0; k < nIndex; k++) {
FIBITMAP *icon_dib = (FIBITMAP*)vPages[k];
diff --git a/plugins/FreeImage/Source/FreeImage/PluginJPEG.cpp b/plugins/FreeImage/Source/FreeImage/PluginJPEG.cpp
index b6393de7aa..b69ace95bc 100644
--- a/plugins/FreeImage/Source/FreeImage/PluginJPEG.cpp
+++ b/plugins/FreeImage/Source/FreeImage/PluginJPEG.cpp
@@ -785,7 +785,7 @@ read_markers(j_decompress_ptr cinfo, FIBITMAP *dib) {
BYTE *icc_profile = NULL;
unsigned icc_length = 0;
- if ( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length) ) {
+ if ( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length)) {
// copy ICC profile data
FreeImage_CreateICCProfile(dib, icc_profile, icc_length);
// clean up
diff --git a/plugins/FreeImage/Source/FreeImage/tmoColorConvert.cpp b/plugins/FreeImage/Source/FreeImage/tmoColorConvert.cpp
index c40ee29c60..367cb13c96 100644
--- a/plugins/FreeImage/Source/FreeImage/tmoColorConvert.cpp
+++ b/plugins/FreeImage/Source/FreeImage/tmoColorConvert.cpp
@@ -61,10 +61,10 @@ static const float CIE_y_b = 0.060F;
static const float CIE_x_w = 0.3127F; // Illuminant D65
static const float CIE_y_w = 0.3290F;
-static const float CIE_D = ( CIE_x_r*(CIE_y_g - CIE_y_b) + CIE_x_g*(CIE_y_b - CIE_y_r) + CIE_x_b*(CIE_y_r - CIE_y_g) );
-static const float CIE_C_rD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_g - CIE_y_b) - CIE_y_w*(CIE_x_g - CIE_x_b) + CIE_x_g*CIE_y_b - CIE_x_b*CIE_y_g) );
-static const float CIE_C_gD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_b - CIE_y_r) - CIE_y_w*(CIE_x_b - CIE_x_r) - CIE_x_r*CIE_y_b + CIE_x_b*CIE_y_r) );
-static const float CIE_C_bD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_r - CIE_y_g) - CIE_y_w*(CIE_x_r - CIE_x_g) + CIE_x_r*CIE_y_g - CIE_x_g*CIE_y_r) );
+static const float CIE_D = ( CIE_x_r*(CIE_y_g - CIE_y_b) + CIE_x_g*(CIE_y_b - CIE_y_r) + CIE_x_b*(CIE_y_r - CIE_y_g));
+static const float CIE_C_rD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_g - CIE_y_b) - CIE_y_w*(CIE_x_g - CIE_x_b) + CIE_x_g*CIE_y_b - CIE_x_b*CIE_y_g));
+static const float CIE_C_gD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_b - CIE_y_r) - CIE_y_w*(CIE_x_b - CIE_x_r) - CIE_x_r*CIE_y_b + CIE_x_b*CIE_y_r));
+static const float CIE_C_bD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_r - CIE_y_g) - CIE_y_w*(CIE_x_r - CIE_x_g) + CIE_x_r*CIE_y_g - CIE_x_g*CIE_y_r));
/**
RGB to XYZ (no white balance)
@@ -415,8 +415,8 @@ static void findMaxMinPercentile(FIBITMAP *Y, float minPrct, float *minLum, floa
std::sort(vY.begin(), vY.end());
- *minLum = vY.at( int(minPrct * vY.size()) );
- *maxLum = vY.at( int(maxPrct * vY.size()) );
+ *minLum = vY.at( int(minPrct * vY.size()));
+ *maxLum = vY.at( int(maxPrct * vY.size()));
}
/**
diff --git a/plugins/FreeImage/Source/FreeImage/tmoFattal02.cpp b/plugins/FreeImage/Source/FreeImage/tmoFattal02.cpp
index 71be370b3e..bcd4524523 100644
--- a/plugins/FreeImage/Source/FreeImage/tmoFattal02.cpp
+++ b/plugins/FreeImage/Source/FreeImage/tmoFattal02.cpp
@@ -283,7 +283,7 @@ static FIBITMAP* PhiMatrix(FIBITMAP **gradients, float *avgGrad, int nlevels, fl
}
if(k < nlevels-1) {
- // compute PHI(k) = L( PHI(k+1) ) * phi(k)
+ // compute PHI(k) = L( PHI(k+1)) * phi(k)
FIBITMAP *L = FreeImage_Rescale(phi[k+1], width, height, FILTER_BILINEAR);
if (!L) throw(1);
diff --git a/plugins/FreeImage/Source/FreeImage/tmoReinhard05.cpp b/plugins/FreeImage/Source/FreeImage/tmoReinhard05.cpp
index dfa6553806..969aa4c950 100644
--- a/plugins/FreeImage/Source/FreeImage/tmoReinhard05.cpp
+++ b/plugins/FreeImage/Source/FreeImage/tmoReinhard05.cpp
@@ -113,7 +113,7 @@ ToneMappingReinhard05(FIBITMAP *dib, FIBITMAP *Y, float f, float m, float a, flo
for(x = 0; x < width; x++) {
I_a = Y[x]; // luminance(x, y)
for (i = 0; i < 3; i++) {
- *color /= ( *color + pow(f * I_a, m) );
+ *color /= ( *color + pow(f * I_a, m));
max_color = (*color > max_color) ? *color : max_color;
min_color = (*color < min_color) ? *color : min_color;
@@ -164,7 +164,7 @@ ToneMappingReinhard05(FIBITMAP *dib, FIBITMAP *Y, float f, float m, float a, flo
I_l = c * *color + (1-c) * L;
I_g = c * Cav[i] + (1-c) * Lav;
I_a = a * I_l + (1-a) * I_g;
- *color /= ( *color + pow(f * I_a, m) );
+ *color /= ( *color + pow(f * I_a, m));
max_color = (*color > max_color) ? *color : max_color;
min_color = (*color < min_color) ? *color : min_color;
diff --git a/plugins/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp b/plugins/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp
index 7046a4acc9..d38d8c1bcd 100644
--- a/plugins/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp
+++ b/plugins/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp
@@ -730,7 +730,7 @@ Rotate45(FIBITMAP *src, double dAngle, const void *bkcolor) {
}
else {
// Negative angle
- dOffset = dTan * ( (src_width - 1.0) * -dSinE + (1.0 - height_3) );
+ dOffset = dTan * ( (src_width - 1.0) * -dSinE + (1.0 - height_3));
}
for(u = 0; u < height_3; u++, dOffset += dTan) {
int iShear = int(floor(dOffset));
@@ -878,7 +878,7 @@ FreeImage_Rotate(FIBITMAP *dib, double angle, const void *bkcolor) {
// copy background color
RGBQUAD bkcolor;
- if ( FreeImage_GetBackgroundColor(dib, &bkcolor) ) {
+ if ( FreeImage_GetBackgroundColor(dib, &bkcolor)) {
FreeImage_SetBackgroundColor(dst, &bkcolor);
}
diff --git a/plugins/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp b/plugins/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp
index 59757287ed..753fdc736e 100644
--- a/plugins/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp
+++ b/plugins/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp
@@ -608,7 +608,7 @@ FreeImage_Copy(FIBITMAP *src, int left, int top, int right, int bottom) {
// copy background color
RGBQUAD bkcolor;
- if ( FreeImage_GetBackgroundColor(src, &bkcolor) ) {
+ if ( FreeImage_GetBackgroundColor(src, &bkcolor)) {
FreeImage_SetBackgroundColor(dst, &bkcolor);
}
diff --git a/plugins/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp b/plugins/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp
index c5345497f5..2d7399dcb2 100644
--- a/plugins/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp
+++ b/plugins/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp
@@ -211,7 +211,7 @@ LosslessTransform(const FilenameIO *filenameIO, FREE_IMAGE_JPEG_OPERATION operat
// Prepare transformation workspace
// Fails right away if perfect flag is TRUE and transformation is not perfect
- if ( !jtransform_request_workspace(&srcinfo, &transfoptions) ) {
+ if ( !jtransform_request_workspace(&srcinfo, &transfoptions)) {
FreeImage_OutputMessageProc(FIF_JPEG, "Transformation is not perfect");
throw(1);
}
diff --git a/plugins/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp b/plugins/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp
index 6d17d45319..a31961447a 100644
--- a/plugins/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp
+++ b/plugins/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp
@@ -68,7 +68,7 @@ static void fmg_restrict(FIBITMAP *UC, FIBITMAP *UF, int nc) {
// 0.5 * UF(row_uf, col_uf) + 0.125 * [ UF(row_uf+1, col_uf) + UF(row_uf-1, col_uf) + UF(row_uf, col_uf+1) + UF(row_uf, col_uf-1) ]
float *uc_pixel = uc_scan + col_uc;
const float *uf_center = uf_scan + col_uf;
- *uc_pixel = 0.5F * *uf_center + 0.125F * ( *(uf_center + uf_pitch) + *(uf_center - uf_pitch) + *(uf_center + 1) + *(uf_center - 1) );
+ *uc_pixel = 0.5F * *uf_center + 0.125F * ( *(uf_center + uf_pitch) + *(uf_center - uf_pitch) + *(uf_center + 1) + *(uf_center - 1));
}
uc_scan += uc_pitch;
}
@@ -158,8 +158,8 @@ static void fmg_prolongate(FIBITMAP *UF, FIBITMAP *UC, int nf) {
for(row_uf = 1; row_uf < nf-1; row_uf += 2) {
float *uf_scan = uf_bits + row_uf * uf_pitch;
for (col_uf = 0; col_uf < nf; col_uf += 2) {
- // calculate UF(row_uf, col_uf) = 0.5 * ( UF(row_uf+1, col_uf) + UF(row_uf-1, col_uf) )
- uf_scan[col_uf] = 0.5F * ( *(uf_scan + uf_pitch + col_uf) + *(uf_scan - uf_pitch + col_uf) );
+ // calculate UF(row_uf, col_uf) = 0.5 * ( UF(row_uf+1, col_uf) + UF(row_uf-1, col_uf))
+ uf_scan[col_uf] = 0.5F * ( *(uf_scan + uf_pitch + col_uf) + *(uf_scan - uf_pitch + col_uf));
}
}
}
@@ -168,7 +168,7 @@ static void fmg_prolongate(FIBITMAP *UF, FIBITMAP *UC, int nf) {
float *uf_scan = uf_bits;
for(row_uf = 0; row_uf < nf; row_uf++) {
for (col_uf = 1; col_uf < nf-1; col_uf += 2) {
- // calculate UF(row_uf, col_uf) = 0.5 * ( UF(row_uf, col_uf+1) + UF(row_uf, col_uf-1) )
+ // calculate UF(row_uf, col_uf) = 0.5 * ( UF(row_uf, col_uf+1) + UF(row_uf, col_uf-1))
uf_scan[col_uf] = 0.5F * ( uf_scan[col_uf + 1] + uf_scan[col_uf - 1] );
}
uf_scan += uf_pitch;
diff --git a/plugins/FreeImage/Source/LibJPEG/jcparam.c b/plugins/FreeImage/Source/LibJPEG/jcparam.c
index c5e85dda55..1c81d2ec59 100644
--- a/plugins/FreeImage/Source/LibJPEG/jcparam.c
+++ b/plugins/FreeImage/Source/LibJPEG/jcparam.c
@@ -422,7 +422,7 @@ jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace)
compptr->v_samp_factor = (vsamp), \
compptr->quant_tbl_no = (quant), \
compptr->dc_tbl_no = (dctbl), \
- compptr->ac_tbl_no = (actbl) )
+ compptr->ac_tbl_no = (actbl))
/* Safety check to ensure start_compress not called yet. */
if (cinfo->global_state != CSTATE_START)
diff --git a/plugins/FreeImage/Source/LibPNG/png.c b/plugins/FreeImage/Source/LibPNG/png.c
index 5a490b2d92..0df53a62af 100644
--- a/plugins/FreeImage/Source/LibPNG/png.c
+++ b/plugins/FreeImage/Source/LibPNG/png.c
@@ -1035,13 +1035,13 @@ int png_XYZ_from_xy(png_XYZ *XYZ, png_xy xy)
*
* red-scale =
* ( (green-x - blue-x) * (white-y - blue-y) -
- * (green-y - blue-y) * (white-x - blue-x) ) / white-y
+ * (green-y - blue-y) * (white-x - blue-x)) / white-y
* -------------------------------------------------------------------------
* (green-x - blue-x)*(red-y - blue-y)-(green-y - blue-y)*(red-x - blue-x)
*
* green-scale =
* ( (red-y - blue-y) * (white-x - blue-x) -
- * (red-x - blue-x) * (white-y - blue-y) ) / white-y
+ * (red-x - blue-x) * (white-y - blue-y)) / white-y
* -------------------------------------------------------------------------
* (green-x - blue-x)*(red-y - blue-y)-(green-y - blue-y)*(red-x - blue-x)
*
diff --git a/plugins/FreeImage/Source/LibPNG/pngconf.h b/plugins/FreeImage/Source/LibPNG/pngconf.h
index 3fea47b860..121d204ccd 100644
--- a/plugins/FreeImage/Source/LibPNG/pngconf.h
+++ b/plugins/FreeImage/Source/LibPNG/pngconf.h
@@ -182,9 +182,9 @@
* conventions of the various functions.
*/
#if ( defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\
- defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) ) &&\
+ defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)) &&\
( defined(_X86_) || defined(_X64_) || defined(_M_IX86) ||\
- defined(_M_X64) || defined(_M_IA64) )
+ defined(_M_X64) || defined(_M_IA64))
/* Windows system (DOS doesn't support DLLs) running on x86/x64. Includes
* builds under Cygwin or MinGW. Also includes Watcom builds but these need
* special treatment because they are not compatible with GCC or Visual C
diff --git a/plugins/FreeImage/Source/LibPNG/pngpriv.h b/plugins/FreeImage/Source/LibPNG/pngpriv.h
index 5f751de23d..02cc5d8c53 100644
--- a/plugins/FreeImage/Source/LibPNG/pngpriv.h
+++ b/plugins/FreeImage/Source/LibPNG/pngpriv.h
@@ -532,7 +532,7 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
#define PNG_ROWBYTES(pixel_bits, width) \
((pixel_bits) >= 8 ? \
((png_size_t)(width) * (((png_size_t)(pixel_bits)) >> 3)) : \
- (( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3) )
+ (( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3))
/* PNG_OUT_OF_RANGE returns true if value is outside the range
* ideal-delta..ideal+delta. Each argument is evaluated twice.
@@ -540,7 +540,7 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
* integers, "value" a variable. Added to libpng-1.2.6 JB
*/
#define PNG_OUT_OF_RANGE(value, ideal, delta) \
- ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
+ ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta))
/* Conversions between fixed and floating point, only defined if
* required (to make sure the code doesn't accidentally use float
diff --git a/plugins/FreeImage/Source/LibPNG/pngrtran.c b/plugins/FreeImage/Source/LibPNG/pngrtran.c
index 26083a0dd5..bbee10ce56 100644
--- a/plugins/FreeImage/Source/LibPNG/pngrtran.c
+++ b/plugins/FreeImage/Source/LibPNG/pngrtran.c
@@ -4331,7 +4331,7 @@ png_do_gamma(png_row_infop row_info, png_bytep row, png_structp png_ptr)
((((int)gamma_table[a|(a>>2)|(a>>4)|(a>>6)]) ) & 0xc0)|
((((int)gamma_table[(b<<2)|b|(b>>2)|(b>>4)])>>2) & 0x30)|
((((int)gamma_table[(c<<4)|(c<<2)|c|(c>>2)])>>4) & 0x0c)|
- ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6) ));
+ ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6)));
sp++;
}
}