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 UltraVox » Sat Jul 26, 2014 3:30 am

Ok David,

We will proceed otherwise. :wink:
Give me informations (Position X/Y and Size of the area), and I do the rest.

You agree ?
UltraVox
 
Posts: 419
Joined: Sat Jul 28, 2007 11:14 am
Location: France

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

Postby dec » Sat Jul 26, 2014 3:31 am

Hello,

What about the hpwSimpleGraph plugin? I this can draw "images" "objects" (see bellow in the image the rounded rectangles) maybe can do the job (the design part) since this "objects" can be move by the user.

Image
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

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

Postby UltraVox » Sat Jul 26, 2014 3:36 am

For two reasons :

1/ I have not found a way to save the user work in an image format such as PNG transparent 32-bit.

2/ I do not think SimpleGraph be used in a commercial application...

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 dec » Sat Jul 26, 2014 3:53 am

Hello,

UltraVox wrote:For two reasons :

1/ I have not found a way to save the user work in an image format such as PNG transparent 32-bit.

2/ I do not think SimpleGraph be used in a commercial application...

Best,


May you can't save the user work like an image, but what about get the user selection measures? I am thinkin in two objects placed on the user work space: one contain the image wich act like the "background", and the another object which contain the "image to be placed" into the first image. Then allow the user to move this second object: and therefore you may know the position of the second object (image) into the first one.

Then may you can use this dimensions in order to compose the final PNG image using the above watermark actions, for example. About the commercial application usage... what are your doubts? I think you cannot have problems to do that.
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

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

Postby UltraVox » Sat Jul 26, 2014 4:37 am

I have not checked... what license free software is it.
I would have no problem with HPW :) , but I do not want to have problems with the creator of SimpleGraph software.

Then I did not understand how to create a rectangle (with dimensions of an image) and place it in automatically, or even display a background image... It's very confusing. In the Windows version, I get all in 10 seconds. But I can not do with the plugin. However, the workspace is excellent and meets my expectations. If anyone here knows how to use the plugin, I do not say no to a small lesson with SimpleGraph :) The only thing I get is the display of the grid in the rectangle.

Then I must be sure of one thing: The 32-bit PNG files transparency must be respected imperatively (alpha channels). This is not the case with hpwImage plugin (24 bits). Is this the case of plugin SimpleGraph (32 bits)? The Windows version of the software can not use 32-bit PNG files.
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 » Sat Jul 26, 2014 7:40 am

Is this the case of plugin SimpleGraph (32 bits)?


Simplegraph is also a 24 bit component and does not support 32 bit Images.
Image components with support for Alpha channel are no trivial task, so development would be expensiv.
Not sure if anything like that exists in the neobook plugin eco-system.

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

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

Postby UltraVox » Sat Jul 26, 2014 8:29 am

Yes Hans :(

No luck, because I was starting to enjoy myself with your plugin...

How to get Object-ID ?
How to change the Designer Properties (Background color, Grid color, ect...) ?

For me, the biggest advantage of this beautiful plugin is that it can load / save .SGP files designed with the Windows version.

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

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

Postby mishem » Sat Jul 26, 2014 8:48 am

You can look in the direction of ImageMagick.
mishem
 
Posts: 575
Joined: Mon Oct 08, 2012 1:51 pm

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

Postby HPW » Sat Jul 26, 2014 10:43 am

...... SGP files designed with the Windows version.


You mean the demo-Version of the component.
This Delphi-app Shows all the Features of the component.

How to get Object-ID ?


When you create a object via script a variable is created. Watch the Debugger.
When you click an existing object you get a click-variable with the id. Watch the Debugger.

How to change the Designer Properties (Background color, Grid color, ect...) ?


The plugin with the edit-dialogs uses the same dialogs as the demo and uses standard Windows Color sheme.
You should be able to build your own property dialogs with custom Windows.
There was a discussion about this wish on page 9 of the hpwSimplegraph thread.

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

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

Postby UltraVox » Sat Jul 26, 2014 11:11 pm

mishem wrote:You can look in the direction of ImageMagick.


Or, build a small plugin to spend 24 to 32 bits PNG, and vice versa. This format was created in 2004, standardized by ISO (ISO/CEI 15948:2004), and still can not use it in many NB plugins.
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 » Sat Jul 26, 2014 11:39 pm

Thanks you Hans.

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

Allright. Why not get the Object-ID with/in hpwSimpleGraphGetObjectInfo command ? Simple and useful.

The plugin with the edit-dialogs uses the same dialogs as the demo and uses standard Windows Color sheme.

But this window (standard Windows Color sheme) does not interest me. She is too old (its gray color is wrong with my futuristic design app.) :)

You should be able to build your own property dialogs with custom Windows.
There was a discussion about this wish on page 9 of the hpwSimplegraph thread.

I see nothing that speaks on page 9. I see nothing like it in the entire Post.
Please, give me the commands to change the background color of the grid, without using image file, and the grid color.

This:
Code: Select all
hpwSimpleGraphSetVar "[hpwSimpleGraphGridColor]" "clRed"

Does not work (no change). Why ?

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 » Sun Jul 27, 2014 11:44 am

Allright. Why not get the Object-ID with/in hpwSimpleGraphGetObjectInfo command ? Simple and useful.


I do not understand. The object id is the unique identifier for the object and needed to access it and it's properties.

I see nothing that speaks on page 9. I see nothing like it in the entire Post.


I mean the conversation with user mig_cs2 who asked also for building his own Dialogs. viewtopic.php?f=3&t=13893&start=120

hpwSimpleGraphSetVar "[hpwSimpleGraphGridColor]" "clRed"
Does not work (no change). Why ?


Because the variable is only read on execution-time of the hpwSimpleGraphCreate command.
Why shoul we Need to change the grid color during it's use? You could recreate a new one if really needed.

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

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

Postby UltraVox » Sun Jul 27, 2014 2:54 pm

Thank you Hans,

I thought we should first create the instance and then apply the colors.
It certainly could not run ^^
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 » Mon Jul 28, 2014 12:59 am

Hans and all,

This is my use of SimpleGraph. The objective is to add celestial objects (or virtually anything else) in a 3D space (CubeMapping). In this example, the Earth is added in a starry SkyBox. If your game takes place in space (on the moon for example), the horizon will reveal the Earth :) The bottom half of the Earth will be hidden by the lunar soil (it is not shown here because it is the 3D engine to deal with).

Then, the workspace is exported as BMP to keep a maximum colors. After, a plugin automatically cut each image (with pre-defined area) of the skybox, including Earth (between two images) to be played in 3D space ;)

Virtually, and using SimpleGraph, you can add what you want in the sky (planet, celestial objects, spaceships, star clouds, everything that goes through your mind, ect ...). This is why PNG transparency plays an important role in my application.

Small screenshot of a portion of "SkyCube Workspace". In this example, the Earth planet is added in a starry SkyBox.
Image

The user loads the SkyBox (image by image, or from the DirectX file), and add images/objects (planets, celestial objects, or virtually anything else) to embellish the sky. Then, "SkyCube Workspace" does the rest : it will export your new environment in the format of your choice. A working tools extremely easy, even allowing to convert images (Objects) in PNG format to remove the "Solid" background colors, and auto-replace it by transparency (Alpha Channel, adjustable from 0 to 100) ! An innovation that will make people happy, because "SkyCube Workspace" provided several dozens of celestial objects, and the user can add as he wants.

Note : SkyCube is an 'all in one' 3D software, with more than 1500+ functions.
"SkyCube Worspace" is only a tool inside SkyCube.


More infos, visit SkyCube FB Page here :
https://www.facebook.com/SkyCube3D
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 » Tue Jul 29, 2014 9:46 pm

Hans,

About Object-ID.

When you create a object via script a variable is created. Watch the Debugger.
When you click an existing object you get a click-variable with the id. Watch the Debugger.


It's okay, but except that the user of my final application has no Debugger... I suggest the user to my app to add a background image in a SG square that is not yet created. The question is : how to get Object-ID of a square that will be created in the final application, without NB Debugger, to assign a background image ?

The command is :
Code: Select all
hpwSimpleGraphSetObjectProperty "Graph" "UNKNOWN ID" "NodeBgFile" "Background.png"


Hence my proposal to add "Get Object-ID" in hpwSimpleGraphGetObjectInfo Action. Because I do not know how to get Object-ID of an object created in the final application (without NB Debugger).

Could you explain to me, please ?
Ideally, an new action to get ID of the Last Object (NODE) created would be appreciated...

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

PreviousNext

Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 1 guest