Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 11-08-2019, 02:20 PM   #1
tack
Human being with feelings
 
tack's Avatar
 
Join Date: Jan 2014
Location: Ontario, Canada
Posts: 1,619
Default API: support larger images with gfx.setimgdim()

Currently images are limited to 2048x2048 which, given the resolution of today's monitors, is not as big as it used to be.

It's possible to gfx.loadimg() larger images, which makes 2k with gfx.setimgdim() feel like an artificial limitation.

IMO the dimensions allowed by gfx.setimgdim() should be at least 4k, probably even 8k.
tack is offline   Reply With Quote
Old 11-09-2019, 10:26 AM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

You can overcome it, by loading a png of your desired size into that image.
It's just a workaround but works great.
Have tested it up to 10k by 10k resolution.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 11-09-2019, 10:32 AM   #3
tack
Human being with feelings
 
tack's Avatar
 
Join Date: Jan 2014
Location: Ontario, Canada
Posts: 1,619
Default

Quote:
Originally Posted by mespotine View Post
You can overcome it, by loading a png of your desired size into that image.
It's just a workaround but works great.
Have tested it up to 10k by 10k resolution.
Yeah, I mentioned above that gfx.loadimg() supports much larger images, and in fact I have been doing this exact trick myself.

It just seemed arbitrary given that the underlying support for large images was clearly there, hence this FR.

The scenario that prompted me to start this thread was loading a large image from disk and I wanted a clone of the image that included some simple post-processing (inverting colors basically). It seemed clunky that I needed to load the image twice from disk, as opposed to once and just blitting it over to a separate buffer created with gfx.setimgdim().
tack is offline   Reply With Quote
Old 11-09-2019, 10:59 AM   #4
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

I forgot to add: +1000
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 11-09-2019, 01:53 PM   #5
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by mespotine View Post
You can overcome it, by loading a png of your desired size into that image.
It's just a workaround but works great.
Have tested it up to 10k by 10k resolution.
You can load bigger images - but still cannot draw/write into that image beyond 2048x2048 pixels - at least last time I tried this.

So it's only a good workaround if you aren't needing to alter that image (for instance - using it as a changing part of a GUI).

So +1000 again for the feature request...
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 11-14-2019, 05:18 AM   #6
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

I managed to draw beyond 2048 into a bigger picture. I did it on Windows but haven't tested it on Mac/Linux.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 03-17-2020, 03:48 AM   #7
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by mespotine View Post
I managed to draw beyond 2048 into a bigger picture. I did it on Windows but haven't tested it on Mac/Linux.
Wow - missed this - really?? Going to try now...
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 03-17-2020, 05:04 AM   #8
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Ok - yes - you can blit past 2048 pixels This is great!!

But - there's another problem - which maybe can be solved?


I need to frequently clear the bitmaps to transparent. Normally - I'd use setimgdim(bmp,-1,-1) for this - but then it kills the size of the bitmap and you need to either use setimgdim(bmp,sizex,sizey) - which is limited to 2048 again - Or reload the transparent background bitmap - which is horribly horribly slow - and not suitable for my purposes.

Anyone know any way to clear a reaper bitmap any other way? blitting a transparent bitmap over the top won't clear it in normal gfx mode - is there a gfx mode which will force drawing/blitting a transparent rectangle over opaque pixels to make then transparent again??

Thanks,

I mean - ideally though - as bitmaps can be used >2048 - why the API is still limited to 2048 is a bit baffling...
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 03-18-2020, 06:42 AM   #9
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

In answer to my question

gfx.muladdrect

allows me to set all pixels to transparent.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 04-10-2020, 02:49 AM   #10
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Bump - This one will make working with large script GUI's (on ultra HD displays - and for other purposes) so so much easier than it currently is - and *seems* like it shouldn't be such a massive difficultly to tweak since all the graphics functions (except setimgdim) already work with larger bitmap sizes (I know sometimes these things are not as simple as they seem).
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:45 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.