Convert JSON Format to PSD via Java

Java API to parse JSON format to PSD within any Java J2SE, J2EE, J2ME applications


Using Aspose.Total for Java , you can convert JSON format to PSD within any Java application in two simple steps. Firstly, by using Aspose.Cells for Java , you can parse JSON to JPEG. After that, by using Aspose.Imaging for Java , you can convert JPEG to PSD.

Convert JSON Format to PSD via Java

  1. Create a new Workbook object and open JSON file
  2. Save JSON as JPEG using save method
  3. Load JPEG document by using Image class
  4. Save the document to PSD format using save method

Get Started with Java File Automation APIs

You can easily use Aspose.Total for Java directly from a Maven based project and include libraries in your pom.xml.

Alternatively, you can get a ZIP file from downloads .

Set Layout and Convert JSON Format to PSD via Java

Furthermore, the API allows you to parse JSON to PSD with specified layout options. In order to specify the layout options, you can use JsonLayoutOptions class. It allows you to process an array as a table, ignore nulls, ignore array title, ignore object title, convert string to number or date, set date and number format, and set title style. All of these options allow you to present your data as per your needs. The following code snippet shows you how to set the layout options.

Convert JSON Format to PSD with Watermark via Java

Using the API, you can also convert JSON to PSD with watermark in your PSD document. In order to add a watermark to you can first convert JSON to JPEG and add a watermark in it. In order to add watermark, load an image file using the Image class, create an object of the Graphics class and initialize it with Image object, create a new Matrix object and set translation and transformation to the desired angle and add watermark using Graphics.drawString method. After adding the watermark in your image, you can save the JPEG as PSD format.

Other Conversion Options

JSON TO SVGZ (Compressed Scalable Vector Graphics)
JSON TO WMF (Windows Metafile)
JSON TO DICOM (Digital Imaging and Communications in Medicine)
JSON TO DXF (Autodesk Drawing Exchange Format)
JSON TO IMAGE (Image Files)
JSON TO TGA (Truevision Graphics Adapter)
JSON TO EMZ (Windows Compressed Enhanced Metafile)
JSON TO APNG (Animated Portable Network Graphics)
JSON TO WMZ (Compressed Windows Metafile)

JSON What is JSON File Format?

JSON (JavaScript Object Notation) is an open standard file format for sharing data that uses human-readable text to store and transmit data. JSON files are stored with the .json extension. JSON requires less formatting and is a good alternative for XML. JSON is derived from JavaScript but is a language-independent data format. The generation and parsing of JSON is supported by many modern programming languages. application/json is the media type used for JSON.

Read More

PSD What is PSD File Format?

PSD, Photoshop Document, represents Adobe Photoshop’s native file format used for graphics designing and development. PSD files may include image layers, adjustment layers, layer masks, annotations, file information, keywords and other Photoshop-specific elements. Photoshop files have default extension as .PSD and has a maximum height and width of 30,000 pixels, and a length limit of two gigabytes.

Read More