On Mon, Mar 16, 2009 at 10:04 PM, Werner Benger <wer...@cct.lsu.edu> wrote: > Hereby I encountered the problem that the type of the yStride variable in > Imf::Slice is of type size_t, which is unsigned. As a consequence, the [...] > A simple cure is to add a type conversion from the size_t value to an > integer (sizeof(size_t)=8, sizeof(int)=4 on this platform, thereby assuming [...] > + (y - yOffset) * > (int)slice.yStride +
Most platforms offer the 'ssize_t' (a signed size_t, note the extra 's') for this kind of issue. Though MSVC does not define this type, but it can be done in the portability layer anyhow by typedef __int64 ssize_t; /* MSVC 'long' is 32 bit, even for IA64 or AMD64 targets; size_t is an __uint64 there! */ Don't know a smarter/better way to write EXR images upside down, alas. -- Met vriendelijke groeten / Best regards, Ger Hobbelt -------------------------------------------------- web: http://www.hobbelt.com/ http://www.hebbut.net/ mail: g...@hobbelt.com mobile: +31-6-11 120 978 -------------------------------------------------- _______________________________________________ Openexr-devel mailing list Openexr-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/openexr-devel