Follow-up from #824 (pix_n_flix Conductor migration). The module's API changed in a few ways during the migration, some restored, some gone for good, and probably some we haven't found yet. Opening this to track that properly instead of leaving it as tribal knowledge in a PR thread.
What's already restored, same as before
red_of, green_of, blue_of, alpha_of and set_rgba are back with their original signatures and the same 0-255 value range (checked against both the old source and the currently published docs). They're built on top of the new get_pixel_value/set_pixel_value, so nothing content-facing needs to change for these five.
What's new and unavoidable
get_pixel(image, x, y) is a new function replacing direct src[x][y] indexing wherever code needs to grab a pixel. Old code that indexed straight into a source/destination image is broken and can't be fixed on our side: opaque image handles just aren't indexable at the language level in either py-slang or js-slang, and getting that working again would mean changing the interpreters themselves, not something to do at the module level.
This isn't hypothetical. There's at least one public old mission (Zeepheru/cs1101s, missions/18_StreamingTheAnomaly.js) that does exactly this directly:
dst[i][j] = current_img[i][j];
Since Python support for pix_n_flix is brand new as of this migration, this only affects existing Source (JS) content, nothing Python-side existed to break.
What we're asking for
Someone who knows what pix_n_flix content currently exists (missions/quests/paths) needs to actually check what's out there, not just the double-indexing case above. There's very likely other stuff we haven't hit yet: subtle behavior changes, edge cases, things that quietly work differently now. This issue is meant to track that audit rather than close it.
Also worth considering
A lot of the confusion here comes from docs that were written entirely from the Source (JS) side. Might be worth having a proper Python-facing section or page for modules going forward, since stuff like get_pixel's usage, or general Python-crossing-the-boundary gotchas (numbers always coming back as float, not int, being a common one), don't really have a natural home in the current docs.
Follow-up from #824 (pix_n_flix Conductor migration). The module's API changed in a few ways during the migration, some restored, some gone for good, and probably some we haven't found yet. Opening this to track that properly instead of leaving it as tribal knowledge in a PR thread.
What's already restored, same as before
red_of,green_of,blue_of,alpha_ofandset_rgbaare back with their original signatures and the same 0-255 value range (checked against both the old source and the currently published docs). They're built on top of the newget_pixel_value/set_pixel_value, so nothing content-facing needs to change for these five.What's new and unavoidable
get_pixel(image, x, y)is a new function replacing directsrc[x][y]indexing wherever code needs to grab a pixel. Old code that indexed straight into a source/destination image is broken and can't be fixed on our side: opaque image handles just aren't indexable at the language level in either py-slang or js-slang, and getting that working again would mean changing the interpreters themselves, not something to do at the module level.This isn't hypothetical. There's at least one public old mission (
Zeepheru/cs1101s,missions/18_StreamingTheAnomaly.js) that does exactly this directly:Since Python support for pix_n_flix is brand new as of this migration, this only affects existing Source (JS) content, nothing Python-side existed to break.
What we're asking for
Someone who knows what pix_n_flix content currently exists (missions/quests/paths) needs to actually check what's out there, not just the double-indexing case above. There's very likely other stuff we haven't hit yet: subtle behavior changes, edge cases, things that quietly work differently now. This issue is meant to track that audit rather than close it.
Also worth considering
A lot of the confusion here comes from docs that were written entirely from the Source (JS) side. Might be worth having a proper Python-facing section or page for modules going forward, since stuff like
get_pixel's usage, or general Python-crossing-the-boundary gotchas (numbers always coming back as float, not int, being a common one), don't really have a natural home in the current docs.