Sun Java Solaris Communities My SDN Account Join SDN

Article

Release Notes for Project Nile Preview

 
July 2008  
 
Project Nile is a set of tools for converting graphics to a format that can be used for JavaFX applications. This document provides release information about enhancements, system requirements, and known issues.
 
Contents
 
System Requirements
Details of Export from Adobe Illustrator and Adobe Photoshop
Known Bugs, Issues, and Limitations
More Information
 
System Requirements

Project Nile has been tested on the following platforms and technologies:

Microsoft® Windows® XP with Service Pack 2 or Windows Vista Home Premium, Business, Ultimate, or Enterprise (certified for 32-bit editions):

  • Processor: Intel Pentium 4, Intel Centrino, Intel Xeon, or Intel Core Duo (or compatible)
  • Memory: 512MB of RAM (1GB recommended)
  • Disk space: 64MB of available hard-disk space
  • Java SE Development Kit: To achieve optimal performance, use JDK 6 Update 7 or later

Macintosh OS X 10.5.2+:

  • Processor: Multicore Intel
  • Memory: 512MB of RAM (1GB recommended)
  • Disk space: 64MB of available hard-disk space
  • Java SE Development Kit: Java for Mac OS X 10.5 Update 1

    Note: If you do not plan to run JavaFX Graphics Viewer to display graphic representations of FXD descriptions, you can run on the default Java 5 for Mac OS X without installing the update.

Graphics Applications
One or both of the following Adobe Creative Suite 3 applications must be installed in order to export graphics to FXD file format:

  • Adobe Illustrator CS3
  • Adobe Photoshop CS3

Project Nile can also convert graphics directly from SVG file format to FXD file format or JavaFX Script code. See below for SVG conversion limitations.

NetBeans IDE
If you work with the samples or demos, you will need the following IDE:

Details of Export from Adobe Illustrator and Adobe Photoshop

The Installation Guide provides information on how to export files from Adobe Illustrator and Adobe Photoshop. If you have questions or encounter problems with export or conversion to FXD file format or JavaFX Script code, there are several places you can look for help. This section includes details about how files are exported from Adobe Illustrator or Adobe Photoshop. The Known Bugs section contains information about product limitations. The installation guide also includes a Troubleshooting section that can help you work through specific problems.

Adobe Illustrator
The Project Nile plugin exports artwork from Adobe Illustrator as follows:

  • Art names can contain only ASCII characters (A-Z, a-z, 0-9, and underscore). All other characters are translated to underscores, because the layer name is the identifier in JavaFX Script.

  • The artwork in Adobe Illustrator is internally stored mainly as simple curves. The export plugin tries to identify and reconstruct higher-level structures (such as rectangles or ellipses) and generate a JavaFX FXD file. Any artwork that is not recognized is exported as simple path constructs.

  • The plugin supports the Rotate and Skew transformations (with some limitations). This means that the four lines that form the rotated rectangle are exported as a Rectangle node with the applied transformation.

  • All multi-line texts or texts with different attributes (for example, size or style) are exported as separate Text nodes.

  • All text placed a on curve are converted to glyphs using the SVGPath node.

  • All fonts used in the exported artwork are stored as TTF font files, converted from OTF format if needed. The font files for system fonts ( Arial, SansSerif and Times Roman) are not exported, since they should be available on all systems. The font file is created in the same directory as the exported file and the {__DIR__} construct is used to reference it from the source file.

  • Exported gradients with midpoints set to values other than 50% are approximated on export with a variable number of color stops depending on the color difference.

  • If an art element is not visible, it is still exported and the attribute visible: false is set in the corresponding JavaFX node.

  • Only the art with names changed by the user will be assigned an ID in the corresponding JavaFX node. The art with a default name (such as <Path> for path artwork) will be anonymous in the generated source.

  • The name of each art element must be unique across the entire Adobe Illustrator document. If two art elements are assigned the same name by the user, export will fail with an error message.

  • For each image or raster art element, a PNG file is created and referenced from the generated source. The PNG file is created in the same directory as the exported file and the {__DIR__} construct is used to reference it from the source file.

  • The opacity of a an art element is set in the corresponding JavaFX node.

  • When Adobe Illustrator art is exported to FX Data format (*.fxd), a JavaFX script stub file is also generated. The stub file name is constructed as document-nameUI.fx, and the file serves as a connection between the FXD file (user interface) and application business logic. Public attributes in stub files expose the named art elements in the FXD file to application logic. The referencing attributes are initialized at runtime when the FXD file loads.

  • If art in Adobe Illustrator has a suffix in square brackets (for example, [] or [10]), then the public attribute in the JavaFX Script code (or stub file) is an array of its respective type. This means that you cannot have the same array name for artwork of more than one type. For example, you cannot mix rectangles with groups. Mixing types with the same array will cause export to fail with an error message.

Adobe Photoshop
The Project Nile plugin exports layers from Adobe Photoshop as follows:

  • Layer names can contain only ASCII characters (A-Z, a-z, 0-9, and underscore). All other characters are translated to underscores, because the layer name is the identifier in JavaFX Script.

  • For each group from Adobe Photoshop, a corresponding group is created in JavaFX Script code.

  • If a layer is not visible, it is still exported and the attribute visible: false is set in the corresponding JavaFX node.

  • For each image layer (any layer containing pixels), a PNG file is created and referenced from the generated source. The PNG file is created in the same directory as the exported file and the {__DIR__} construct is used to reference it from the source file.

  • The opacity of a layer (group or image layer) is set in the respective JavaFX node.

  • The Layer mask is exported as a special image that is applied to the corresponding image by SRC_IN blending mode in JavaFX. The file name of the exported layer mask is document name_layer_name_mask.png

  • The vector mask is rasterized and exported to a special image as a Layer mask.

  • The Smart Filter mask is exported to a special image as a Smart Filter mask.

  • When an Adobe Photoshop image is exported to the FX Data format (*.fxd), then a JavaFX Script stub file is generated. The stub file name is constructed as document-nameUI.fx, and the file serves as a connection between the FXD file (user interface) and application business logic. Public attributes in the stub file contains expose the layers that enable the scene graph to be manipulated. The referencing attributes are initialized at runtime when the FXD file loads.

  • If a layer name in Adobe Photoshop has a suffix in square brackets (for example, [] or [10]), then the public attribute in the JavaFX Script code (or stub file) is an array of its respective type. This means that you cannot have the same array name for groups or layers of more than one type. For example, you cannot mix rectangles with groups. Mixing types with the same array will cause export to fail with an error message.

  • The name of each layer or group must be unique across the entire Adobe Photoshop document. If two art elements are assigned the same name by the user, export will fail with an error message.

  • Text layers are always rasterized.

  • Smart objects are also rasterized
Known Bugs, Issues, and Limitations

Issues are grouped by Project Nile component.

Adobe Illustrator Plugin
Export from Adobe Illustrator using the Project Nile plugin has the following limitations:

  • Character tracking (spacing between characters) is ignored

  • The graph element is not supported.

  • Fill patterns are ignored.

  • Color blending is ignored.

  • Clipping by a compound path is not supported.

  • Shape style is ignored.

  • Text paths are exported as glyphs in the same fashion as graphic paths and so cannot be used for dynamic content.

  • There is only limited support for Adobe Illustrator effects and filters. In particular only Gaussian Blur and the Drop Shadow effects are supported, and and they are not completely identical to the effects available in JavaFX.

  • Exporting to JavaFX Script (.fx) means the graphic will be compiled into bytecode when the application is compiled and therefore may exceed JVM limits for a class file. For large graphics, export to JavaFX Data (.fxd), which is treated as a resource file.

  • The JavaFX shapes Circle, Ellipse, and Star are not supported. Use the Path shape instead.

JavaFX Data (FXD) file format cannot be imported into Adobe Illustrator. To view the graphic, use the JavaFX Graphics Viewer in the Project Nile installation.

Adobe Photoshop plugin

  • Supported Image Modes

    The Project Nile plugin supports the following modes in Adobe Photoshop:

    • Grayscale, 8-bits per channel

    • RGB, 8-bits per channel

    • RGB, 16-bits per channel

    For these supported modes, the maximum resolution of image that can be exported is 30000 x 30000 pixels. If the image image mode is one that is not supported, the export option is disabled.

  • Increasing Memory in Adobe Photoshop

    The Project Nile plugin requires a negligible amount of memory for export. However, if you are working with complex images, you may need to increase memory in Adobe Photoshop itself, which will increase its memory for plugins. In Adobe Photoshop, choose Edit < Preferences > Performance. In the Memory Usage pane, increase the amount of memory granted to Photoshop.

  • Photoshop Features Not Supported in This Release

    These Adobe Photoshop features are handled by the Project Nile plugin in the following ways:

    • Blending modes (for example, Darken, Multiply) are ignored

    • Blending options (such as Drop Shadow and Outer Glow) are ignored

    • Clipping mask layers are are exported as normal layers (the image is exported as seen)

    • Layers that do not contain pixels are ignored (such as adjustment layers)

    • Fill layers are ignored

    Note: JavaFX Data (.fxd) cannot be imported into Adobe Photoshop. To view the graphic, use the JavaFX Graphics Viewer in the Project Nile installation.

JavaFX Graphics Viewer
See the Installation Guide for instructions on how to use the JavaFX Graphics Viewer.

JavaFX Graphics Viewer may fail while opening very large FXD or JavaFX Script code files (approximately larger than one megabyte), The failure can occur for two reasons. In case, the failure occurs with JavaFX Script code only, because there is a hard limit on the class, method and constant pools sizes in the Java VM. The error message begins with the following line:

file:file-name.fx from StringInputBuffer:44: code too large

Because graphics exported JavaFX Script code are compiled, it is preferable to export large graphics to FXD file format, which is treated as a resource file.

The second reason for failure applies to both FXD file format and JavaFX Script code files. The error is a java.lang.NullPointerException and occurs because of insufficient program memory. There is a workaround for FXD files, and possibly for JavaFX Script code files (though they will still be subject to the "code too large" limitation).

For Windows:

  1. Navigate to project-nile-installation-directory\viewer and open viewer.ini.

  2. Find the line that begins Virtual Machine Parameters and raise the value. (The default value is 256 megabytes.) The value should be larger than your file size.

For Mac OS X:

  1. Navigate to the Project Nile installation directory.

  2. Control-click Viewer and select Show Package Contents, then navigate to Contents/Resources.

  3. Open viewer in a text editor.

  4. Find -J-Xmx256M in the last line and raise the value. (The default value is 256 megabytes.) The value should be larger than your file size.

SVG Conversion Tool
See the Installation Guide for instructions on how to use the SVG Conversion Tool.

The following SVG features are not supported for SVG conversion in Project Nile:

  • SVG masks
  • SVG filters
  • SVG animations
  • SVG element tspan
  • Interactive SVG and ECMAScript
  • SVGZ compressed file format
More Information
Rate and Review
Tell us what you think of the content of this page.
Excellent   Good   Fair   Poor  
Comments:
Your email address (no reply is possible without an address):
Sun Privacy Policy

Note: We are not able to respond to all submitted comments.