02-17-2023, 03:09 PM | #1 |
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,416
|
gfx_getpixel returns wrong values, or what...?
Trying to track down an issue, I wrote the following experimental video processor code:
Code:
colorspace = 'RGBA'; myimg = gfx_img_alloc(project_w, project_h, 1); gfx_dest = myimg; // from now on draw here y = 0; while (y < project_h) ( x = 0; while (x < project_w) ( res = gfx_getpixel(0, x, y, r, g, b); // get from input, returns 1 gfx_set(r, g, b); gfx_fillrect(x, y, 1, 1); // draw 1x1 rect (a pixel) on myimg x += 1; ); y += 1; ); gfx_dest = -1; gfx_blit(myimg); // blit to framebuffer gfx_img_free(myimg); I've tried with the full parameter list of both gfx_getpixel and gfx_set, but that did not change anything.
__________________
// MVHMF I never always did the right thing, but all I did wasn't wrong... |
02-17-2023, 03:33 PM | #2 |
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
I'll not be of much help, but maybe I can ask some questions to exclude stuff.
Did you use the code as trackfx or takefx? Are there multiple videosources(like different tracks) or is it only one video in the project?
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish On vacation for the time being... |
02-17-2023, 03:43 PM | #3 | |
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,416
|
Quote:
Video processor as track FX. And it is the only FX on the only track in the whole project; there's just a single video source on this single track. The "video" was a png, but I just now tried it with a gif, same result (actually worse, now I get not the slightest resemblance to the original, only white).
__________________
// MVHMF I never always did the right thing, but all I did wasn't wrong... |
|
02-17-2023, 04:37 PM | #4 |
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
You could try to put the rgb-values into a gmem and check with a gfx-reascript, whether the values are all white or even try to draw them in a gfx-window.
That way you could see, whether getpixel is the culprit or fillrect. If it's all white, then its really getpixel. If it's drawn correctly, it's something else.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish On vacation for the time being... |
02-17-2023, 04:50 PM | #5 | |
Human being with feelings
Join Date: Aug 2020
Location: Brasil
Posts: 679
|
Quote:
|
|
02-18-2023, 11:32 AM | #6 | |
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,416
|
Quote:
@Mespo: Could you maybe document this in your video processor documentation? Please. @Papa: This is then an issue also with the Rutt Etra code
__________________
// MVHMF I never always did the right thing, but all I did wasn't wrong... Last edited by Fabian; 02-18-2023 at 11:55 AM. |
|
02-19-2023, 06:23 AM | #7 |
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Will do 🙂
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish On vacation for the time being... |
02-19-2023, 07:36 AM | #8 | |
Human being with feelings
Join Date: Aug 2020
Location: Brasil
Posts: 679
|
Quote:
@mespo: I haven't forgotten about writing a guide to the video processor but it's closely linked to the release of my Girafx lib that will requires a guide that covers the same concepts... |
|
02-22-2023, 03:55 PM | #9 | |
Human being with feelings
Join Date: Aug 2020
Location: Brasil
Posts: 679
|
Quote:
|
|
Thread Tools | |
Display Modes | |
|
|