Reputation
2,591
Next privilege 3,000 Rep.
Cast close & reopen votes
Badges
1 9 23
Impact
~45k people reached

Feb
7
comment Fast loading of png files
By the way, the C99 thing there is the declaration of a variable in the for statement, local to the for loop. You can try to pull those declarations out. E.g. size_t n; for (n = image->height; n;), and then see what other C99 thing will cause a problem.
Feb
7
comment Fast loading of png files
After a little digging, I found that Microsoft Visual Studio 2010 does not support the C99 (1999) standard, and it appears that they have no intent to fully support it even today! In other words, Microsoft does not support the C standard that is now 17 years old (the same age as my younger son). Not much I can do about that. Every other currently maintained C compiler that I am aware of fully supports C99. You can instead use Intel C or GNU C (gcc) on Windows, both of which, of course, fully support C99. You might try MSVS 2015 to see how much it supports, but it probably won't work either.
Feb
7
comment Fast loading of png files
Sigh. No. The backslashes are how you put double quotes inside a double-quoted string in Mathematica.
Feb
6
comment Fast loading of png files
I'd guess not. All I can say is that the code is written in standard, portable C. You're on your own. Good luck.
Feb
6
comment Fast loading of png files
In typical Unix compilation/linking options, -lxxx will link in the library libxxx with whatever the standard extension is on that system (e.g. .so, .dylib), assuming that it is in the library search path. So -lpng links in the libpng library. I don't know what the comparable option would be on your system.
Feb
6
comment Fast loading of png files
Sorry, no, I can't help with compiling in your Windows environment as I am thankfully unfamiliar. You might try to first get compiling C code to work without trying to use libpng. You will then need to figure out the compiler options to use other libraries, like libpng.
Feb
6
awarded  Popular Question
Feb
5
revised How does Mathematica detect the number of cores in a system?
add response to updated question
Feb
1
answered How does Mathematica detect the number of cores in a system?
Jan
29
awarded  Nice Answer
Jan
25
comment How can I read compressed .Z file automatically by Mathematica?
No, I hadn't considered that. I already have some things in github, so I'll put it in there. Were you thinking a .nb notebook? I don't know how amenable that format is to diff, which is kind of at the core of git. Or is Mathematica stuff usually distributed as .m files?
Jan
24
comment What algorithm do the Compress and Uncompress functions use?
The "1:" may be a version and/or endianess indicator. Oleksandr is correct in that calling those "reversed" is just a personal bias on your part. They are in the correct and proper little-endian order. (Note that the use of "correct and proper" is a personal bias on my part.)
Jan
24
comment Fast loading of png files
You may not want the image data in Real32. That's what you get from the default ImageData[image]. The original image data, with integer pixel values, can be had with ImageData[image, Automatic]. That might be faster to work with, depending on what you're doing.
Jan
24
revised Fast loading of png files
added 10 characters in body
Jan
24
revised Fast loading of png files
update source code
Jan
24
answered Fast loading of png files
Jan
24
awarded  Enlightened
Jan
24
awarded  Nice Answer
Jan
23
comment What algorithm do the Compress and Uncompress functions use?
I was referring to the comment within the web page linked by the comment. Sorry if it appears as if I impugned MarcoB. As for my comment on the comment in the web page linked by the comment, the two things noted as wrong are forever wrong. They are not time dependent. My second comment may be time dependent, hence my use of "currently". If someone has an example of old Compress[]'ed data, then I can look at what it was using then.
Jan
23
comment What algorithm do the Compress and Uncompress functions use?
Very nice......