Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Convert Raster Image to Metafile, Cropping & Watermarking Metafiles in Java Apps

 
Ranch Hand
Posts: 714
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is new in this release?

Aspose development team is pleased to announce the new release Aspose.Imaging for Java 2.9.1 . This month’s release contains many useful improvements which will certainly ease the task of processing Metafiles with Aspose.Imaging for Java. Please refer to the release notes of Aspose.Imaging for Java 2.9.1 for a full list of bug fixes and improvements along with sample code snippets for newly added features. While working with images in Java applications, we may encounter scenarios where we need to save the images generated with Aspose.Imaging for Java in an instance of BufferedImage. This simple conversion is now available with the help of ImageExtensions.toJava factory method. Aspose.Imaging for Java 2.9.1 has exposed two versions of the ImageExtensions.toJava method to suit most of the application requirements. The first revision of the aforesaid method can accept an instance of com.aspose.imaging.Image and returns an object of java.awt.image.BufferedImage. Whereas the other revision of the ImageExtensions.toJava method can also accept an instance of com.aspose.imaging.Rectangle as second parameter to return a part of image as an object of java.awt.image.BufferedImage. This release has exposed two versions of the MetafileImage.crop method to perform the cropping on Metafiles such as EMF. Both revisions of the MetafileImage.crop method accept different types of parameters and perform different type of cropping such as Cropping by Shifts and Cropping by Rectangle. For now the resultant cropped image can only be stored in raster image formats such as BMP, PNG, TIFF, GIF & JPEG. In case the result has to be stored back in Metafile format then the changes will not take effect. We have already planned to enhance this feature for Metafile formats as well, and hope to publish the enhancements with next release of the Aspose.Imaging for Java API. Aspose.Imaging for Java has exposed the getWatermarkDrawer method for all classes that represent Metafiles such as EmfMetafileImage, MetafileImage and WmfMetafileImage. The getWatermarkDrawer method returns an instance of java.awt.Graphics2D object which in turn allows to create custom watermarks for Metafiles. This release has exposed the EmfMetafileImage.createEmfRecorderGraphics method that returns an instance of EmfRecorderGraphics2D that in turn can be used to call the drawImage method while specifying the instance of Image to be inserted in EMF image. The main new and improved features added in this release are listed below

- Cropping functionality for EMF files
- Implement ability for adding both vector graphics and bitmap components to Metafile
- Certain symbols render as boxes while converting EMF to PNG
- ArgumentOutOfRangeException: Non-negative number required. Parameter name: sourceIndex at TiffImage.save
- Metafile incorrectly renders pen line width
- Converting EMF to PNG: Aspose.Imaging's generated PNG is bad in Quality
- Aspect Ratio Changes while Converting WMF to PNG: Resultant Image is Stretched Horizontally
- Incorrect text rendering with 'Cambria Math' font in Aspose.Metafiles
- Bitmap stretching in Aspose.Metafiles works incorrectly
- Aspose.Metafiles ignores values in Bounds field of the EMR_HEADER structure
- [Java] Conversion of Raster images to EMF
- [Investigation Required] Splitting the Multi-Frame Tiff image to separate Tiff images is taking too long

Newly added documentation pages and articles

Some new tips and articles have now been added into Aspose.Imaging for Java documentation that may guide you briefly how to use Aspose.Imaging for performing different tasks like the followings.

- Cropping Metafiles
- Adding Watermark to Metafiles

Overview: Aspose.Imaging for Java

Aspose.Imaging for .NET is an image processing & manipulation component that allows developers to create, edit, draw or convert images in their .NET application. It allows developers to convert image files to PSD, BMP, JPEG, PNG, TIFF and GIF formats. Moreover a set of pens, brushes and fonts can be used to draw images or add new elements & text to existing images. Aspose.Imaging for .NET works well with both web & windows applications. Moreover, it adds the support for Silverlight platform.

More about Aspose.Imaging for Java

- Homepage for Aspose.Imaging for Java
- Download Aspose.Imaging for Java
- Online documentation of Aspose.Imaging for Java

Contact Information

Aspose Pty Ltd
Suite 163, 79 Longueville Road
Lane Cove, NSW, 2066
Australia
Aspose - Your File Format Experts
[email]sales@aspose.com[/email]
Phone: 888.277.6734
Fax: 866.810.9465
 
Let's get him boys! We'll make him read this tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!