Hi Christopher,

thank you very much for your elaborate help.

I am doing things the way I am doing them as this QC patch is literally my first contact with QC, and also my first program in objective c I have ever written. This said, things are apparently already fast enough for my team, so I am quite ok with it...

I know that this is suboptimal and that I am leaking memory by the bucket, which is why I am striving to make it better. I already added a autorelease to the NSBitmapImageRep - although I am not using it, i need it to set up the struct for the vImage_Buffer that will hold my final image.

But yeah:
why not use malloc() to get a buffer of the right size (width * height * 3),
Ok, sounds good, but how to go then about my scaling then?
The image resizer patch before sending it out is your way then? One patch for every task, right? This sounds ok, yet the size of the LED wall displaying the image can be variable. The width and height needs to be set in the protocol frame, which is why I added the scaling in my patch.

write into the buffer,
Second problem: the buffer is now set up to be width * height * 3, thus has no alpha.
How do I write the RGB pixel data in it without the dreaded alpha value?


and then make an NSData out of the malloc'd block (since I assume you're using some kind of convenience library what wants an NSData to send stuff). make sure you free the buffer when you're done, and you'll skip millions of message sends, reallocs, and potential memcpys. per frame.
Yes, ok, sounds very good!

I'll scratch NSData as my buffer as well. I just need some nudges in the right direction, I am not that comfortable in C++ either...


Thanks again,

--
Christophe Leske
multimedial.de

----------------------------------------
www.multimedial.de - i...@multimedial.de
Hohler Strasse 17 - 51645 Gummersbach
+49(0)2261-99824540 // +49(0)177-2497031
----------------------------------------

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to