It is currently Sun Jul 22, 2018 9:08 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Clipboard 32bit Images
PostPosted: Fri Mar 30, 2018 2:35 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 462
Location: Linz, Austria
SetClipboardImage() seems to have problems with 32bit images!

The source image imported from the clipboard into XnView (Gimp,...) introduces artifacts near the round corner. The same clipboard image imported into paint.net even comes without the alpha channel.
Source:Image
XnView:Image
paint.net:Image

Code:
UsePNGImageDecoder()
LoadImage(0, "clp_00.png") ;#PB_Compiler_Home + "Examples\3D\Data\Textures\grass2.png")
SetClipboardImage(0)


Top
 Profile  
Reply with quote  
 Post subject: Re: Clipboard 32bit Images
PostPosted: Thu Apr 12, 2018 2:12 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 462
Location: Linz, Austria
plot twist ^^

SetClipboardImage() works fine! All you have to do is to "premultiply alpha" ;)
Code:
RGBA((r * alpha + 127) * 0.003921, (g * alpha + 127) * 0.003921, (b * alpha + 127) * 0.003921, alpha)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye