Skip to content

Commit 186cd78

Browse files
committed
Remove "msc" comments.
1 parent d4cc52d commit 186cd78

File tree

2 files changed

+6
-27
lines changed

2 files changed

+6
-27
lines changed

lodepng.cpp

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,6 @@ freely, subject to the following restrictions:
2727
The manual and changelog are in the header file "lodepng.h"
2828
Rename this file to lodepng.cpp to use it for C++, or to lodepng.c to use it for C.
2929
*/
30-
/*
31-
This file has been altered from the original. The decodeGeneric function has
32-
been split into the public lodepng_decode_chunks and static inflateIdat.
33-
decodeGeneric has been reimplemented by calling these 2 functions. A new
34-
public lodepng_finish_decode has been added. With the new public functions
35-
a user can separate decode of all the chunks, so as to learn all the details
36-
of the file, from decompression, and possible conversion, of the image data.
37-
Search for msc to see the changes.
38-
39-
Additional warning disables have been added. 4267 for MS VC++ and the
40-
equivalent -Wshorten-64-to-32 for clang. "32-bit shift implicitly converted
41-
to 64 bits" warnings have been fixed by changing 1u constants to 1ull.
42-
*/
4330

4431
#include "lodepng.h"
4532

@@ -5298,8 +5285,8 @@ unsigned lodepng_inspect_chunk(LodePNGState* state, size_t pos,
52985285
return error;
52995286
}
53005287

5301-
/*extracted from the original decodeGeneric by msc*/
53025288
/*read the PNG's chunks, updating the state and accumulating the iDAT chunks*/
5289+
/*extracted from previous version of decodeGeneric*/
53035290
unsigned lodepng_decode_chunks(void** idat_out, size_t* idatsize_out, unsigned* w, unsigned* h,
53045291
LodePNGState* state,
53055292
const unsigned char* in, size_t insize) {
@@ -5478,7 +5465,7 @@ unsigned lodepng_decode_chunks(void** idat_out, size_t* idatsize_out, unsigned*
54785465
return state->error;
54795466
}
54805467

5481-
/*extracted from the original decodeGeneric by msc*/
5468+
/*extracted from the previous version of decodeGeneric*/
54825469
static unsigned inflateIdat(unsigned char** out,
54835470
unsigned char* directOut, size_t directOutSize,
54845471
unsigned w, unsigned h,
@@ -5544,7 +5531,6 @@ static unsigned inflateIdat(unsigned char** out,
55445531
return state->error;
55455532
}
55465533

5547-
/*added by msc*/
55485534
/*finishes decode by inflating the images captured from the idat chunks by lodepng_decode_chunks
55495535
and converting them if info_raw differs from info_png.color. A buffer to receive the final
55505536
image data is provided as a parameter.
@@ -5584,8 +5570,8 @@ unsigned lodepng_finish_decode(unsigned char* cbuffer, size_t cbufsize,
55845570
return state->error;
55855571
}
55865572

5587-
/*reimplemented by msc.*/
55885573
/*read a PNG, the result will be in the same color type as the PNG (hence "generic")*/
5574+
/*reimplemented by calling the functions extracted from previous version*/
55895575
static void decodeGeneric(unsigned char** out, unsigned* w, unsigned* h,
55905576
LodePNGState* state,
55915577
const unsigned char* in, size_t insize) {
@@ -7111,7 +7097,6 @@ const char* lodepng_error_text(unsigned code) {
71117097
case 120: return "invalid cLLI chunk size";
71127098
case 121: return "invalid chunk type name: may only contain [a-zA-Z]";
71137099
case 122: return "invalid chunk type name: third character must be uppercase";
7114-
// Added for 'msc' changes
71157100
case 123: return "destination buffer too small";
71167101
}
71177102
return "unknown error code";

lodepng.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ freely, subject to the following restrictions:
2323
distribution.
2424
*/
2525

26-
/*
27-
This file has been altered from the original. Public lodepng_decode_chunks
28-
and lodepng_finish_decode functions have been added. With these new functions
29-
a user can separate decode of all the chunks, so as to learn all the details
30-
of the file, from decompression, and possible conversion, of the image data.
31-
Search for msc to see the changes.
32-
*/
3326
#ifndef LODEPNG_H
3427
#define LODEPNG_H
3528

@@ -974,7 +967,6 @@ void lodepng_state_copy(LodePNGState* dest, const LodePNGState* source);
974967
/*
975968
Read the PNG's chunks, updating the state and accumulating the iDAT chunks.
976969
idat_out will be set to point to the accumulated iDAT chunks.
977-
Added by msc.
978970
*/
979971
unsigned lodepng_decode_chunks(void** idat_out, size_t* idatsize_out, unsigned* w, unsigned* h,
980972
LodePNGState* state,
@@ -984,7 +976,6 @@ unsigned lodepng_decode_chunks(void** idat_out, size_t* idatsize_out, unsigned*
984976
Inflate the idat accumulated by lodepng_decode_chunks, convert to match
985977
the state->info_raw color type, if necessary, and return the data in
986978
the memory pointed to by cbuffer.
987-
Added by msc.
988979
*/
989980
unsigned lodepng_finish_decode(unsigned char* cbuffer, size_t cbufsize,
990981
unsigned w, unsigned h,
@@ -2028,6 +2019,9 @@ symbol.
20282019
Not all changes are listed here, the commit history in github lists more:
20292020
https://github.com/lvandeve/lodepng
20302021
2022+
*) 19 may 2025: Separated chunk decoding from image decoding and expansion.
2023+
A user can now first decode all the chunks to learn details of the image
2024+
then decompress and, possibly, convert the image data.
20312025
*) 6 may 2025: renamed mDCv to mDCV and cLLi to cLLI as per the recent rename
20322026
in the draft png third edition spec. Please note that while the third
20332027
edition is not finalized, backwards-incompatible changes to its features are

0 commit comments

Comments
 (0)