Skip to Main Content

Application Development Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Image watermark using IBR and Imagemagick

1025059Jun 3 2015 — edited Jun 5 2015

Hi All,

We have a requirement to create a image rendition with  a watermark text.We are using ImageMagick for conversion and have installed FreeType delegates in the Linux box. normal conversion using the resize command works fine but after using the -draw/-font command, I am getting the error as mentioned below

Starting to create the 'MediumWatermark' rendition of type 'Extra'

Creating rendition with command: /usr/local/bin/convert -resize 352x300> -font -draw "gravity south fill white text 0,0 'copyright'" "/OraApplBin/Oracle/Middleware/user_projects/domains/base_domain/ucm/ibr/vault/~temp/qaecmnode116200/1466/2462.jpg" "/OraApplBin/Oracle/Middleware/user_projects/domains/base_domain/ucm/ibr/vault/~temp/qaecmnode116200/1466/mediumwatermark3/mediumwatermark.jpg"

The 'MediumWatermark' rendition failed. The engine reported the following error: 'convert: unable to open image `gravity south fill white text 0,0 'copyright'': @ error/blob.c/OpenBlob/2584.

convert: no decode delegate for this image format `gravity south fill white text 0,0 'copyright'' @ error/constitute.c/ReadImage/532.'

Finished the 'MediumWatermark' rendition.

Below mentioned is my extraRendition_definitions.hda

ImageMagick=/usr/local/bin/convert

ImageMagic_Watermark=-resize 352x300> -font -pointsize 24 -draw

@ResultSet ImageLibrary

6

extRenditionName

extEngine

extType

extSourceFile

extParameters

extDescription

MediumWatermark

<$ImageMagick$>

Extra

<$InFilePath$>

<$ImageMagic_Watermark$> "gravity south fill white text 0,0 'copyright'"  "<$inFile$>"  "<$outFile$>.jpg"

Medium rendition in 352x300 pixels with watermark

@end

Mentioned below is the delegates installed for ImageMagick

DELEGATES     freetype jpeg tiff


I am able to covert the same using command line

convert -resize 352x300  -font -pointsize 24 -draw "gravity south fill white text 0,0 'abcd'" input.jpg output.jpg

Kindly help to resolve the above issue, Please advice if I am missing  any configurations.

Thanks and Regards,

Basudev

This post has been answered by Srinath Menon-Oracle on Jun 4 2015
Jump to Answer

Comments

Jeff Martin

Your query might win the award for the "shortest question with the longest answer", but I'll try for a short answer. For the first part, you need to fetch data from the database. For this you could use anything from raw JDBC to an Object Relational Mapping (ORM) tool, like Hibernate. For the second part, I would recommend a reporting tool, like Jasper Reports, BIRT or ReportMill. Currently, only ReportMill has generated reports in JavaFX. But they all generate PDF - and that would be my suggestion: generate PDF and use the platform PDF viewer to display and print reports. You could spend years trying to duplicate all the nice display and print functionality found in Acrobat Reader and Mac OS X Preview.

As it happens, ReportMill (disclosure: me) is working on a tool to do exactly what your question asks for:

http://www.reportmill.com/javi/gallery/AddressBook

There is also a very cool database tool that has JavaFX support called XDEV. We'll both be at JavaOne.

1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 3 2015
Added on Jun 3 2015
8 comments
1,256 views