Recent

Author Topic: Transparent Clipboard with BgraBitmap  (Read 2739 times)

zxandris

  • Full Member
  • ***
  • Posts: 170
Transparent Clipboard with BgraBitmap
« on: October 10, 2023, 07:21:26 am »
I'm trying to get the bitmap off the clipboard but with transparency.  I've used the general examples on the net for retrieving a bitmap off the clipboard but it doesn't return transparency. 

Does anyone know how to do this and would be willing to share.  I would be most grateful if you would, thanks.  Obviously I'm trying to return to a BgraBitmap with transparency intacked.

lainz

  • Hero Member
  • *****
  • Posts: 4742
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Transparent Clipboard with BgraBitmap
« Reply #1 on: October 10, 2023, 04:51:05 pm »
Hi. Check clipboard unit in Lazpaint.

Not all applications are handled but it's better.

zxandris

  • Full Member
  • ***
  • Posts: 170
Re: Transparent Clipboard with BgraBitmap
« Reply #2 on: October 16, 2023, 02:08:23 am »
Okay, will check that out but is it okay to use that in a closed source application and if so what do I have to do to show I did to be okay with their license? Please, any help here would be appreciated I'm really not sure about licensing for that sort of thing.

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Transparent Clipboard with BgraBitmap
« Reply #3 on: October 16, 2023, 03:49:06 am »
@zxandris:
A quick look learns that lazpaint seem to be GPL3 licensed. That basically means no, you can not use such code inside your closed source application unless having received specific permission from the original author to do so.

Having said that, you are allowed to be inspired by the original code and come up with your own written solution.
Today is tomorrow's yesterday.

zxandris

  • Full Member
  • ***
  • Posts: 170
Re: Transparent Clipboard with BgraBitmap
« Reply #4 on: October 16, 2023, 03:50:47 am »
okay, thanks.  That makes sense.  I really only want to use the normal windows clipboard and paste transparent anyway, not necessarily support a load of different application clipboard formats. lol

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: Transparent Clipboard with BgraBitmap
« Reply #5 on: October 22, 2023, 04:27:40 pm »
On Windows, many applications do not send transparency to the clipboard. I suggest  to go through the Clipboard.Formats and see if your source applications provide something that has transparency (after having pressed Ctrl-C).

The one I've found is on Windows is RegisterClipboardFormat('PNG') that is provided by some applications.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018