openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] OpenEXR-1.2.1-win32


From: Florian Kainz
Subject: Re: [Openexr-devel] OpenEXR-1.2.1-win32
Date: Wed, 19 Jul 2006 20:55:13 -0700
User-agent: Mozilla Thunderbird 1.0 (X11/20041207)

Hi Thomas,

the setFrameBuffer() call in your code is incompatible with
the declaration of pixel array p2.  The way p2 is declared
and used, each vertical colum of pixels is contiguous in
memory.  If pointer p, of type Rgba*, points to pixel (x,y)
then pixel (x+1,y) is at address p+height, and pixel (x,y+1)
is at address p+1.  Consequently, the setFrameBuffer() call
should read:

    file.setFrameBuffer (&p2[0][0], height, 1);

For a more information, please see sections 2.1 and 2.2 of
http://www.openexr.com/ReadingAndWritingImageFiles.pdf.

Florian


Thomas Lock wrote:
Hello Drew

                  Before i start using the latest build, i wanted to tryout
the compiled C version you gave me a link to little bit ago. I mostly did
this since i can get it to compile very quickly, but everytime i try to
excute this code from my other app the whole thing crashes. I'm not exacty
sure why but i believe everything upto "RgbaOutputFile" works, so
statementing out the last 3 calls and the app doesn't crash, but of course
doesn't output the exr. Oh ya compiling my AppEXR dll compiles pretty well.
I also added compiled warning messages at the bottom.

#include "stdafx.h"
#include "AppEXR.h"
#include <string.h>
#include <io.h>
#include <ImfRgbaFile.h>
#include <ImfArray.h>

using namespace  Imf;

BOOL APIENTRY DllMain(HANDLE hModule, DWORD  ul_reason_for_call, LPVOID
lpReserved)
{
    return TRUE;
}

extern "C" void WINAPI writeOpenEXR (char *filename, int width, int height,
float* Bits128)
{
 int LineWidth=width*4;
 Header header (width, height);
const char fileName[] = "c:\foo2.exr";
 Array2D<Rgba> p2 (width, height);
 for(int h=0;h<height;h++)for(int b=0;b<width;b++)
 {
  int i=h*LineWidth+(b<<2);
  p2[b][h].b=half::half(Bits128[i]);
  p2[b][h].g=half::half(Bits128[i + 1]);
  p2[b][h].r=half::half(Bits128[i + 2]);
  p2[b][h].a=half::half(Bits128[i + 3]);
 }

 RgbaOutputFile  file (fileName, header, WRITE_RGBA); // 1
 file.setFrameBuffer (&p2[-height][0], 1, width); // 2
 file.writePixels (height); // 3
}


------ Build started: Project: AppEXR, Configuration: Release Win32 ------
Compiling...
AppEXR.cpp
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\IlmImf\ImfName.h(103)
: warning C4996: 'strncpy' was declared deprecated
        C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(156)
: see declaration of 'strncpy'
        Message: 'This function or variable may be unsafe. Consider using
strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See
online help for details.'
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathMath.h(198)
: warning C4244: 'return' : conversion from 'double' to 'float', possible
loss of data
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathMath.h(198)
: warning C4996: 'hypot' was declared deprecated
        C:\Program Files\Microsoft Visual Studio 8\VC\include\math.h(455) :
see declaration of 'hypot'
        Message: 'The POSIX name for this item is deprecated. Instead, use
the ISO C++ conformant name: _hypot. See online help for details.'
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(215)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
        F:\WORKSPACE\VB
WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(247) : see reference
to class template instantiation 'Imath::Vec2<T>' being compiled
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(219)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(408)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
        F:\WORKSPACE\VB
WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(440) : see reference
to class template instantiation 'Imath::Vec3<T>' being compiled
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(412)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(215)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
        F:\WORKSPACE\VB
WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(483) : see reference
to class template instantiation 'Imath::Vec2<T>' being compiled
        with
        [
            T=short
        ]
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(219)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(489)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(498)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(215)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
        F:\WORKSPACE\VB
WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(507) : see reference
to class template instantiation 'Imath::Vec2<T>' being compiled
        with
        [
            T=int
        ]
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(219)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(513)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(522)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(408)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
        F:\WORKSPACE\VB
WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(531) : see reference
to class template instantiation 'Imath::Vec3<T>' being compiled
        with
        [
            T=short
        ]
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(412)
: warning C4290: C++ exception specification ignored except to indicate a fu
nction is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(537)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(546)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(408)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
        F:\WORKSPACE\VB
WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(555) : see reference
to class template instantiation 'Imath::Vec3<T>' being compiled
        with
        [
            T=int
        ]
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(412)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(561)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(570)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(902)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(939)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(1318)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(1357)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(215)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
        F:\WORKSPACE\VB
WorkSpace\OpenEXR-1.2.1-win32\include\IlmImf\ImfHeader.h(76) : see reference
to class template instantiation 'Imath::Vec2<T>' being compiled
        with
        [
            T=float
        ]
F:\WORKSPACE\VB WorkSpace\OpenEXR-1.2.1-win32\include\Imath\ImathVec.h(219)
: warning C4290: C++ exception specification ignored except to indicate a
function is not __declspec(nothrow)
Linking...
   Creating library .\Release/AppEXR.lib and object .\Release/AppEXR.exp
Embedding manifest...
Build log was saved at "file://f:\WORKSPACE\VB WorkSpace\OpenEXR
plugin\AppEXR\Release\BuildLog.htm"
AppEXR - 0 error(s), 29 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========



Tom.



----- Original Message ----- From: "Drew Hess" <address@hidden>
To: "Thomas Lock" <address@hidden>
Cc: <address@hidden>
Sent: Tuesday, July 18, 2006 2:24 PM
Subject: Re: [Openexr-devel] version 1.3.0


"Thomas Lock" <address@hidden> writes:

I was wondering how stable this version is? I would like to start
testing out the basic capabilities of loading and saving EXR files. Once i
feel more comfortable i will take advantage of more features, but i will
wait till you guys feel the version is stable. I'm using VS2005.
Tom._______________________________________________
Openexr-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/openexr-devel

The latest release is 1.3.2.  I haven't received any reports of
problems with it, but I'm not sure how many people are using it.
Unless I hear something this week, I'm going to try to release 1.4.0
(which will be 1.3.2 without any code changes) before/at
SIGGRAPH... but I'm swamped at the moment, so no promises.

d







_______________________________________________
Openexr-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/openexr-devel






reply via email to

[Prev in Thread] Current Thread [Next in Thread]