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

Srinath Menon-Oracle

ImageMagic_Watermark

Should it not have been

ImageMagick_Watermark

1025059

Hi Shrinath,

Thanks for your response. I am using "ImageMagic_Watermark" as a variable only. My question is does other Image magic commands like composite/draw/font etc work when we use it in extraRendition_definitions.hda. because the normal conversion as mentioned below works when used in the extraRendition_definitions.hda

convert -resize 300x300> "<$inFile$>"  "<$outFile$>.jpg"

I have the freetype delegate installed on the box, Is the there any further configuration needed

Regards

I have never seen that kind of configuration being set in extra renditions file and used . I am testing it as well to see if it works, will keep you posted with details once tests are completed .

1025059

Changed the command as mentioned below in the extraRendition_definitions.hda and it worked

<$inFile$> -resize 500x334^>  -pointsize 24  -draw "gravity south fill grey text 0,12 'Copyright'" <$outFile$>.jpg

Thanks and Regards,

Basudev

Exactly , I was about to put the same details .

Answer

Infact , the way I have done this is :

ImageMagick=/usr/local/bin/convert

ImageMagic_Watermark=-resize 352x300 -pointsize 24 -draw "gravity south fill white text 0,0 'copyright'"

@ResultSet ImageLibrary

6

extRenditionName

extEngine

extType

extSourceFile

extParameters

extDescription

MediumWatermark

<$ImageMagick$>

Extra

<$InFilePath$>

<$ImageMagic_Watermark$> "<$inFile$>"  "<$outFile$>.jpg"

Medium rendition in 352x300 pixels with watermark

@end

Marked as Answer by 1025059 · Sep 27 2020
1025059

Thanks Shreenath for responding to the query.

Regards

Glad to know you got this working .

1 - 8
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,269 views