View Single Post
Old 12-20-2018, 01:55 PM   #14
tXShooter
Human being with feelings
 
tXShooter's Avatar
 
Join Date: Aug 2017
Posts: 336
Default

Quote:
Originally Posted by mespotine View Post
You can set the IDE-colors in the Theme Editor. There's a section for the IDE, at the bottom AFAIK.
THANK YOU!! OMG, that was so harsh on these old eyes.

Quote:
Originally Posted by mespotine View Post
gfx.loadimg also returns a value, that is either the BufferID(0 in your case) or -1(in case of an error). You should check that, because maybe that loading fails already.
I tested this with a 'showmessagebox' in the IDE and it's returning a 0.

Quote:
Originally Posted by mespotine View Post
And you don't need to do gfx.setimgdim of a buffer, in which you want to put an image, as it will be resized automatically to the size of the loaded image-file.
Good to know. Thank you.

Quote:
Originally Posted by mespotine View Post
Oh, how big is the Logo.png in pixels? Framebuffers in the gfx-window support only sizes up to 2048x2048 pixels. Maybe its too big? Don't know, if Reaper would crop the image accordingly...

And you should set the variables gfx.x and gfx.y to the position at which you want to blit the picture.
Alternatively, you can use the longer gfx.blit-version, in which you can include the x and y-position as well, but it's harder to use.
This clued me into the problem as far as the testing in the IDE... the image was far larger than the gfx.x / gfx.y of the window. I resized the image with GIMP and reset the window size appropriately... now it shows fine for the IDE test.


Quote:
Originally Posted by mespotine View Post
And somehow, I stumble over [[C:\\OneDriveTemp\\OneDrive\\Media Ministry\\Logo.png]]. Maybe it's just me, but I would only write "C:\\OneDriveTemp\\OneDrive\\Media Ministry\\Logo.png", though the former should work as well...
I think that I read elsewhere in this forum that the double-bracket system is for verbatim, to include quotes... not 100% sure though. However, I just followed the example that MPL left in that other thread. (For testing purposes, my image still shows if I use a set of quotes with double-forward slashes, as well as quotes with single-reverse slashes.)

Code:
 gfx.init("Logo Image Test",192,93)
 buffer_id = 0 -- top layer
 -- gfx.setimgdim(buffer_id,gfx.w, gfx.h)
  gfx.loadimg(buffer_id,"C:/OneDriveTemp/OneDrive/Media Ministry/Logo 192x93.png" )
gfx.blit(buffer_id,1,0)
  gfx.update()
-- reaper.ShowMessageBox(buffer_id,"Logo Image Test",0)
All of the above work still hasn't gotten me any further in my original script... no image displayed.

I think the hangup is in the way that Lokesenna's GUI handles images. Like you, I think there was at one point in time an image class, but has since been dropped. I dunno. There's several things about this GUI interface that have me stumped, and without any support I'm just about to a point of dumping the entire project and going some other direction... a complete reboot for the 6th time. I can't even contemplate what it is going to take to incorporate an autocomplete textbox from an Excel database into this GUI interface, let alone 18x autocomplete textboxes.

I'm rather frustrated. If you can think of anything else to try, please don't hesitate to pass on the wisdom. I do thank you for your input.
__________________
"But be ye doers of the word, and not hearers only, deceiving your own selves."
tXShooter is offline   Reply With Quote