Old 11-08-2019, 02:20 PM   #1
tack
Human being with feelings
 
tack's Avatar
 
Join Date: Jan 2014
Location: Ontario, Canada
Posts: 933
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
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,911
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.
__________________
Pronounce me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
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: 933
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
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,911
Default

I forgot to add: +1000
__________________
Pronounce me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 11-09-2019, 01:53 PM   #5
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 3,431
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:
LBX Stripper | LBX Chaos Engine | LBX Floating FX Positioner | LBX SRD Smart Knobs
Donate via Paypal
lb0 is online now   Reply With Quote
Old 11-14-2019, 05:18 AM   #6
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,911
Default

I managed to draw beyond 2048 into a bigger picture. I did it on Windows but haven't tested it on Mac/Linux.
__________________
Pronounce me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine 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 05:55 AM.


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