Forums > Jitter

exportimage png with alpha transparency

March 4, 2006 | 11:33 pm

hi

i am trying to export a sequence of pngs
from a webcam after doing a background subtract

exportimage works fine if go direct from cam into matrix
but the resulting png if i pass thru a jit.op @op- is grey

is this a limitation? or am i doing somethin wrong?

simple sample patch below

thanks in advance
jhave

//
max v2;
#N vpatcher 371 87 1424 1025;
#P user jit.pwindow 350 553 82 62 0 1 0 0 1 0;
#P user jit.pwindow 693 433 82 62 0 1 0 0 1 0;
#P user ubumenu 229 216 87 1441802 0 1 1 0;
#X add png;
#X add bmp;
#X add jpeg;
#X add macpaint;
#X add photoshop;
#X add pict;
#X add qtimage;
#X add sgi;
#X add tga;
#X add tiff;
#X prefix_set 0 0 0;
#P window setfont "Fixedwidth Serif" 10.;
#P newex 194 240 122 1441802 pak exportimage png;
#P window setfont "Sans Serif" 9.;
#P newex 194 282 54 196617 jit.matrix;
#P user jit.pwindow 538 272 82 62 0 1 0 0 1 0;
#P button 796 210 46 0;
#P user ubumenu 415 457 87 1441802 0 1 1 0;
#X add png;
#X add bmp;
#X add jpeg;
#X add macpaint;
#X add photoshop;
#X add pict;
#X add qtimage;
#X add sgi;
#X add tga;
#X add tiff;
#X prefix_set 0 0
0;
#P window setfont "Fixedwidth Serif" 10.;
#P newex 380 481 122 1441802 pak exportimage png;
#P window setfont "Sans Serif" 9.;
#P newex 351 524 54 196617 jit.matrix;
#P newex 351 421 286 196617 jit.op @op -;
#P window setfont "Sans Serif" 20.;
#P message 799 280 40 196628 1;
#P window setfont "Sans Serif" 9.;
#P message 640 297 14 196617 0;
#P message 718 189 29 196617 open;
#P toggle 615 168 15 0;
#P newex 615 190 50 196617 qmetro 2;
#P message 668 190 45 196617 getinput;
#P newex 627 226 55 196617 jit.qt.grab;
#P newex 643 333 27 196617 gate;
#P newex 627 268 78 196617 t b l b;
#P newex 627 369 94 196617 jit.matrix @thru 0;
#P comment 854 215 100 196617 save background;
#P window setfont "Sans Serif" 18.;
#P comment 129 407 202 196626 exportimage works fine if matrix is direct from camera but if it passes thru the jit.op @op- then png is grey;
#P fasten 5 0 18 0 350 243 350 275 199 275;
#P connect 19 0 18 0;
#P fasten 20 1 19 1 272 235 311 235;
#P fasten 5 0 12 0 632 251 356 251;
#P connect 14 0 13 0;
#P connect 12 0 13 0;
#P connect 13 0 22 0;
#P fasten 15 1 14 1 458 476 497 476;
#P connect 5 0 17 0;
#P connect 8 0 7 0;
#P connect 6 0 5 0;
#P connect 7 0 5 0;
#P connect 9 0 5 0;
#P connect 5 0 3 0;
#P connect 3 0 2 0;
#P fasten 4 0 2 0 648 362 632 362;
#P connect 2 0 12 1;
#P connect 3 0 10 0;
#P connect 10 0 4 0;
#P connect 11 0 4 0;
#P fasten 3 1 4 1 666 325 665 325;
#P connect 2 0 21 0;
#P connect 16 0 11 0;
#P pop;


March 7, 2006 | 4:54 am

Hello,

re:recording alpha-transparency pngs using exportimage after a jit.op @op-

i’d sincerely appreciate it if someone from Cycling could let me know if this is a limitation of Jitter
or if its just the machine I am using (its a university box
running MaxMSP 4.3.2

I am facing a mild deadline and have reached the end of explorable options.

Thanks
David


March 7, 2006 | 5:12 am

I’m not from Cycling, but I just tried your patch png export seemed
to work fine for me on both the original image and a jit.op –
modified image. I am running OS X 10.4.5 max 4.5.6 and jitter 1.5.2.

Cheers,
Christopher


March 7, 2006 | 5:20 am

many thanks
very very helpful to know
(the pngs after op for me are just grey)

question now is: is this 4.3.2 limitation?
or a bad codec on this particular machine?

thanks again, i’d been banging my head against the wall
thought i was doing something wrong…


March 7, 2006 | 9:26 am

This certainly has nothing to do with your version of Max, but might
have something to do with your version of Jitter, which you haven’t
mentioned. It might also simply be a difference between the QuickTime
version you are using (also not mentioned) and QuickTime 7, which
Christopher Baker is using. It’s also not clear what OS you’re using, or
what platform you are on. All of these factors could contribute to the
problem.

You may find the BUG REPORTING GUIDELINES (copied below) helpful in
formulating reports like this, since vague reports tend to fly under our
radar.

jb

BUG REPORTING GUIDELINES

Please report any problems you experience with clear and complete
information, including steps to reproduce, software and system
information, and where possible, an isolated example patch and crash
log. Something like the following would be ideal. This makes it
easier for us to find and fix the problems you experience. Without
such clear and complete information, it is less likely we will be
able to.

Summary:
Provide a descriptive summary of the issue.

Steps to Reproduce:
In numbered format, detail the exact steps taken to produce the bug.

Expected Results:
Describe what you expected to happen when you executed the steps above.

Actual Results:
Please explain what actually occurred when steps above are executed.

Regression:
Describe circumstances where the problem occurs or does not occur,
such as software versions and/or hardware configurations.

Notes:
Provide additional information, such as references to related
problems, workarounds and relevant attachments.


March 7, 2006 | 9:47 am

jeremy,

sorry if i deviated from the guidelines
(i did provide a patch, and tried to be clear)
and yes have now done a test on another machine
using same patch as posted before

(previous unsuccessful export
machine was
mac os 10.3, max 4.3.2, jitter 1.2.2.

successful test machine:
windows xp, max 4.3.2, jitter 1.2.2)

So the png does export:
BUT without transparency (subtracted regions are simply black).

is there a methodology for exporting a movie or sequence of images with transparency ?

(i have investigated cv.jit and jitter help files and searched archives without any clear answers)

jhave


March 7, 2006 | 9:58 am

Looks like the difference is either platform or QuickTime version then.

If the QuickTime versions are identical on the 2 machines, then it’s
probably a Jitter issue (although we are no longer making updates to the
Jitter 1.2.x code base). If not, you need to bring them into sync to
test this out. I am 95% sure that this is going to turn out to be a
QuickTime issue.

jb


March 7, 2006 | 10:06 am

thanks for yr persistence Jeremy,

I will investigate Quicktime versions on both machines tomorrow and let you know how it works out.

In the meantime, my central more functional question remains:
is it possible export a png with transparency (in photoshop save-for-web this option is referred to as png-24 : Perhaps this codec is not possible to export with Jitter? )

Basically, I am seeking a way to export movies with transparency and assumed png sequences were the answer. I’d really appreciate it if anyone could let me know if this is a feasible path from a technnical standpoint.

Thanks again,
jhave


March 7, 2006 | 5:46 pm

On Mar 7, 2006, at 2:06 AM, david jhave johnston wrote:

>
> In the meantime, my central more functional question remains:
> is it possible export a png with transparency (in photoshop save-
> for-web this option is referred to as png-24 : Perhaps this codec
> is not possible to export with Jitter? )

This should be possible provided it has been appropriately selected
in the export image dialog (millions of colors +, should be 32 bit
with alpha)

> Basically, I am seeking a way to export movies with transparency
> and assumed png sequences were the answer. I’d really appreciate it
> if anyone could let me know if this is a feasible path from a
> technnical standpoint.

This can also be accomplished with jit.qt.record and any codec that
supports an alpha channel such as animation or the several codecs
discussed at the following site.

http://codecs.onerivermedia.com

-Joshua


March 27, 2006 | 3:05 am

joshua,

very sorry to bother u again about something that must be quite simple…

but i have done a test exporting a chromakeyed movie from jit.qt.record using the "animation" codec,
and the alpha channel is black

is there a flag that needs to be set to enable alpha channel tranparency?

patch setup:

jit.qt.chromakey –> jit.qt.record

"write TEST.mov 15. animation max 600"

many thanks
david


March 27, 2006 | 4:14 am

CORRECTION: animation codec does have an alpha channel….
it just wasn’t readable by sorenson…..

thanks!


Viewing 11 posts - 1 through 11 (of 11 total)