Source language: Translate to:

Method to display 2 PNG files with overlay/superimposed

General questions about NeoBook

Moderator: Neosoft Support

Re: Method to display 2 PNG files with overlay/superimposed

Postby HPW » Tue Jul 29, 2014 11:35 pm

Ideally, an new action to get ID of the Last Object (NODE) created would be appreciated...


Not the user should read the Debugger, YOU should do it to understand the plugin logic and actions.

When you create a object via script a variable is created. Watch the Debugger.


When I wrote this above, I mean you look after a variable which appear directly after the creation of an object.
One of them is RectangleName_ObjectEnterId which is the Id of the last created object.

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Method to display 2 PNG files with overlay/superimposed

Postby UltraVox » Wed Jul 30, 2014 12:04 am

Thank you very much Hans. This is the right answer I expected and I thank you !
I did not know "RectangleName_ObjectEnterId" was the variable of the last object created.

Question for you :
There are several PNG file formats (4) and yours is 24 bits (16+8 alpha channels ?). So SimpleGraph should be able to display a transparent PNG image (?) with the 16+8 format, or a transparent GIF (?), But strangely I do not. However, my 'test' images are created with Photoshop CS6. Is it possible to display a transparent image (GIF and / or PNG) in SimpleGraph, please ? If yes, what are the guidelines for transparency is visible in SimpleGraph ? At the moment, I do not get that white replacing transparency.

I sincerely apologize for bothering you with all these questions, but your answers are essential for me.

Thank you.
UltraVox
 
Posts: 419
Joined: Sat Jul 28, 2007 11:14 am
Location: France

Re: Method to display 2 PNG files with overlay/superimposed

Postby HPW » Wed Jul 30, 2014 12:23 am

Simplegraph is also 24 bit, which means 8 bit per color-chanel RGB (Red/Greeen/Blue).
So you get 16 Million Color but no Alpha channel.

So also Simplegraph will not help when you need real transparency.

A different thing would be the use of [hpwSimpleGraphNodeBgTransColor] where you define a key color for the tranparent part of the node. See demo.

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Method to display 2 PNG files with overlay/superimposed

Postby UltraVox » Wed Jul 30, 2014 1:22 am

I tried all the pages of your demo, but I can not find what I want. However, when I load the Sample1.sgp file, the dragon image has a transparent background. This is what I would get !

My Node ID is "0000006". It is a transparent PNG image with a white background in your plugin. Is that "[hpwSimpleGraphNodeBgTransColor]" can remove the white color and replace it with transparency ? If so, how ?

Thank you.
UltraVox
 
Posts: 419
Joined: Sat Jul 28, 2007 11:14 am
Location: France

Re: Method to display 2 PNG files with overlay/superimposed

Postby Tony Kroos » Wed Jul 30, 2014 8:22 am

note that u may display images using WebBrowser object, and do whatever you want (move, overlay, magnify,etc...) using JS. To save image just make a screenshot of window region u need - there is a great number of plugins for that... but still there may be transparency issues.
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Re: Method to display 2 PNG files with overlay/superimposed

Postby UltraVox » Wed Jul 30, 2014 9:10 am

Hi Tony,

I'm sure you're right, but the workspace provided by SimpleGraph is superb in my application. However, I am always interested by the graphics technologies. Could you be kind enough to name the plugins you mention ? Because there is not much available in the NB website/plugins database.

However, I am very interested by KsEraser ;) Transparency Power !
http://www.neosoftware.com/neobook/modu ... .php?cid=4

I thought dreaming reading this...
UltraVox
 
Posts: 419
Joined: Sat Jul 28, 2007 11:14 am
Location: France

Re: Method to display 2 PNG files with overlay/superimposed

Postby Tony Kroos » Wed Jul 30, 2014 10:58 am

for example, the ksFunctions plugin has enough screenshot options, also there are some transparency/mask overlay commands to play with
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Re: Method to display 2 PNG files with overlay/superimposed

Postby HPW » Wed Jul 30, 2014 11:39 am

UltraVox wrote:I tried all the pages of your demo, but I can not find what I want. However, when I load the Sample1.sgp file, the dragon image has a transparent background. This is what I would get !

My Node ID is "0000006". It is a transparent PNG image with a white background in your plugin. Is that "[hpwSimpleGraphNodeBgTransColor]" can remove the white color and replace it with transparency ? If so, how ?


I modified my page 1 demo with this:

Code: Select all
hpwSimpleGraphSetVar "[hpwSimpleGraphNodeBgStyle]" "bsClear"
.psSolid,psDash,psDot,psDashDot,psDashDotDo,psClear,psInsideFrame
hpwSimpleGraphSetVar "[hpwSimpleGraphNodeBorderStyle]" "psClear"

.BMP,JPG,WMF,PNG + embedded BMP,JPG,PNG
hpwSimpleGraphSetVar "[hpwSimpleGraphNodeBgFile]" "[PubDir]neosoft1.png"
.tmAuto,tmFixed
hpwSimpleGraphSetVar "[hpwSimpleGraphNodeBgTransMode]" "tmFixed"
.keycolor for transparent
hpwSimpleGraphSetVar "[hpwSimpleGraphNodeBgTransColor]" "clWhite"
.0/1 for BMP,PNG (WMF always)
hpwSimpleGraphSetVar "[hpwSimpleGraphNodeBgTransparent]" "1"


The neosoft1.png is a modified neosoft.png with some clWhite Areas.
This works for me when I insert a rectangle node.
The Dragon sample is only transparent because of the eliptic shape and not by the Image. Select a rectangle shape and you see the Background.

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Method to display 2 PNG files with overlay/superimposed

Postby UltraVox » Wed Jul 30, 2014 1:57 pm

Hans,

I think it works. But the edges of the image are really imperfect (pixelated), but I'll do some more tests to see what happens.

Thank you very much.
UltraVox
 
Posts: 419
Joined: Sat Jul 28, 2007 11:14 am
Location: France

Re: Method to display 2 PNG files with overlay/superimposed

Postby UltraVox » Wed Jul 30, 2014 2:04 pm

Tony,

Tony Kroos wrote:for example, the ksFunctions plugin has enough screenshot options, also there are some transparency/mask overlay commands to play with


Your ksFunctions plugin is in what language ? My version is in Russian. This is unusable : there are only unreadable characters and a series of "?????".

Do you know an English version, please ?

Thx.
UltraVox
 
Posts: 419
Joined: Sat Jul 28, 2007 11:14 am
Location: France

Re: Method to display 2 PNG files with overlay/superimposed

Postby schmutly » Wed Jul 30, 2014 5:45 pm

schmutly
 
Posts: 217
Joined: Fri Feb 20, 2009 4:16 pm

Re: Method to display 2 PNG files with overlay/superimposed

Postby Tony Kroos » Wed Jul 30, 2014 9:58 pm

schmutly, it's not zm... but ksFunctions )
UltraVox wrote:Do you know an English version, please ?

no, but u may ask Garic (author) to translate.
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Re: Method to display 2 PNG files with overlay/superimposed

Postby HPW » Thu Jul 31, 2014 12:00 am

UltraVox wrote:I think it works. But the edges of the image are really imperfect (pixelated), but I'll do some more tests to see what happens.


Of cource the edges can not be so smooth as with a 8-bit alpha-channel transparency per pixel.
This completly different approach needs a 32bit component.

Regards,
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Method to display 2 PNG files with overlay/superimposed

Postby UltraVox » Thu Jul 31, 2014 12:59 am

Naturally Hans,

The result is almost better using the elliptical shape (for image planet insertion).
This plugin win largely "powerful" if transparency was possible.

Best,
UltraVox
 
Posts: 419
Joined: Sat Jul 28, 2007 11:14 am
Location: France

Re: Method to display 2 PNG files with overlay/superimposed

Postby Garic » Wed Aug 20, 2014 4:08 pm

Look this example
http://rghost.ru/57581909
ks
.............
Image
User avatar
Garic
 
Posts: 107
Joined: Wed Sep 26, 2012 8:42 am

PreviousNext

Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 2 guests