[Qt-jambi-interest] Instantiating 'QImage(byte[], ..)' in a loop crashes the Java-VM
Ralf.Weber at diehl-bgt-defence.de
Ralf.Weber at diehl-bgt-defence.de
Fri Nov 14 11:25:55 CET 2008
Hi,
I'm sorry, I think posted this in the wrong forum 'Qt labs forum -general
diskussions' before.
I'm experimenting with a tool to visualize raw image data (i.e 14bit grey
values)
using a QImage with 'Format_RGB32', following I convert the raw data to a
byty[]
array with 4 byte rgb data.
To support playback I instanziate the images with
'image = new QImage(imgRgbBuf, 128, 128,
QImage.Format.Format_RGB32);'
in a loop and display the new image with 'painter.drawImage(0, 0, image);'
in the 'paintEvent()' slot (see 'ImgTest.java').
This crashes the Java-VM after a while.
Performace is no issue (..actually;-).
Using the 'image.loadFromData(imgRgbBuf, "Format_RGB32")' on the same
buffer as
above always returns 'false' and doesn't work.
How can I visualize raw rgb-data out of a buffer in mem. (in a loop) ?
Is it possible to work directly with int[] data ?
I strapped down a short example application in 'ImgTest.java'. (see
attachment)
Sorry, I'm neither a Java nor a Qt expert. Many thanks for your help in
advance,
it would be much appreciated.
Ralf
(See attached file: ImgTest.java)(See attached file: hs_err_pid4516.log)
_________________________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ImgTest.java
Type: application/octet-stream
Size: 1328 bytes
Desc: not available
Url : http://lists.qt.nokia.com/pipermail/qt-jambi-interest/attachments/20081114/b0570521/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hs_err_pid4516.log
Type: application/octet-stream
Size: 8980 bytes
Desc: not available
Url : http://lists.qt.nokia.com/pipermail/qt-jambi-interest/attachments/20081114/b0570521/attachment-0001.obj
More information about the Qt-jambi-interest
mailing list