Hi Antonio,

you have to call the set() method, setWidth(), setHeight() just changes the width and height field but doesn't (re) allocate any memory.

img->set(Image::OSG_RGB_PF, 500, 500);

Andreas

Hi,

I want to create an empty image with a certain size
and a certain pixel format, e.g. 500x500 in RGB
8 bit unsigned byte for each color channel. Do _I_ have to provide the data pointer through the "setData" method? The doc is not very clear
about that.


ImagePtr img = Image::create()
img->setWidth(500);
img->setHeight(500);
img->setDepth(24);

img->getData(); // returns NULL, why?


Cheers,

        Toni

--
Ing. Antonio Bleile
Seac02 S.r.l.
via Avogadro 4
10121 Torino Italia
Tel. +39.011.197.006.52
Fax +39.011.197.006.53
E-mail [EMAIL PROTECTED]
Sito www.seac02.it

Questa E-mail è rivolta unicamente alle persone o enti ai quali è
indirizzata. Essa può contenere informazioni la cui riservatezza è tutelata.
Sono vietati la riproduzione e qualsiasi uso di questa e-mail e/o delle
informazioni in essa contenute in mancanza di autorizzazione del
destinatario. This e-mail is intended only for the person or entity to which is addressed.
It may contain information that is privileged, proprietary, confidential,
attorney work product or otherwise exempted from disclosure under applicable
law. Copying, dissemination or use of this e-mail or the information herein
by anyone other than the intended recipient is prohibited.




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users





-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to