![]() |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The LoadPNG
command loads an image in PNG format, which can then be displayed in the fore- or background
or as a 3D object. The maximum allowed image size is the same as the maximum OpenGL texture size
(usually 2048x2048 pixels). The image content is not part of the scene and therefore not affected by LoadSce/SaveSce or Undo/Redo. If you
attach an image to an object and reload this scene later,
you must load the image separately. This can be automated by saving a macro
. Note that YASARA occasionally has to reload the PNG image from disk,
so please do not rename or move the file while the image is shown on screen, otherwise the image will appear plain white with the message
'Image not loaded'. Be careful when using a transparent color: your image must really have a clear separation between the transparent color and the rest. If you use antialised fonts,
the pixels at the font edges have colors that are mixtures of the transparent color and the font color,
which will show up as an ugly border around the fonts. If antialiased fonts are a must,
choose a transparent color that is very close to the actual YASARA background color
, then the border will be hardly visible. Or, the best solution, create the image with an alpha channel from the beginning
(this can be done with Gimp or Photoshop). Example 1:LoadPNG board Load the PNG file board, board.png or png/board.png as a new image.
Example 2:LoadPNG MyFile,TransCol=Magenta Load PNG file MyFile.png or png/MyFile.png as a new image and define magenta
(RGBCOLOR ff00ff) as the transparent color. Example 3:image=LoadPNG MyFile As above and assign the image number to variable 'image'.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||