Intermedia Fotoficient
 

Transcoding images - The URL API

Intermedia Fotoficient provides all of the necessary basic image transcoding functions. In this example, we use an open URL API to directly address and combine transcoding operations.
Each basic image operation is called a PixelProcessor in the Intermedia Framework. PixelProcessors may be combined, and are always executed in the given order. Each example shows the involved URL-API commands.
Play with the parameters yourself and use this link to add further URL parameters...

 
 
/s,x,300,y,300/

Scale an image

URL: /s,x,300,y,300/

Scaling an image is changing the physical dimensions of the image in terms of width (x) and height (y) in pixels.

Parameter Description
s scale
x x-size (pixel)
y y-size (pixel)
 
 
/r,a,45/

Rotate an image

URL: /r,a,45/

The rotate operation will rotate the image around its geometrical center. The physical dimensions of the resulting image may vary from the originating image.

Parameter Description
r rotate
a angle (degree)
bg (optional) background-color (hex-RGB)
 
 
/m,d,v/

Flip an image (vertical)

URL: /m,d,v/

Flipping an image is equal to mirroring the image horizontally or vertically.

Parameter Description
m mirror
d direction (v = vertical flip, h = horizontal flip)
 
 
/g,a,1.5/

Apply a gamma correction to an image

URL: /g,a,1.5/

Gamma correction is one way to increase the visual contrast of an image in accordance to the optical reception. Use the gamma correction to gain more vivid colors and stronger differences between dark and bright image areas.

Parameter Description
g gamma
a amount (Typical values operate between 1.4 and 2.6)
 
 
/b,a,50/

Change image brightness

URL: /b,a,50/

Changing the brightness of an image.

Parameter Description
b brightness
a amount (Use an integer in the range between -100 and 100)
 
 
/bo,w,300,h,300,b,f60,p,cc/

Put an image in a box

URL: /bo,w,300,h,300,b,f60,p,cc/

When applying image operations, the resulting size of an image is dependant on the size of the input-image. If you need a fixed-size image as a result of your operation queue, use the box parameter, to ensure, that the image result will fit exactly into the boxes dimensions. We will add a defined background color or transparency.

Parameter Description
bo box
w width (pixel)
h height (pixel)
b (optional) background-color (hex-RGB)
p (optional) position (tl, tc, tr, cl, cc, cr, bl, bc, br)
 
 
/o,i,b85D_Il3N0vHb2BD_IRD5FD3aSlL5K7tWnZda2ou5d,p,cc,o,20/

Superimpose two images (watermark/overlay)

URL: /o,i,b85D_Il3N0vHb2BD_IRD5FD3aSlL5K7tWnZda2ou5d,p,cc,o,20/

With our superimposition filter, you can overlay two images. You need a second image in order to perform this operation. If you are working with an URL interface, you need a short key id for the second image. The superimposition filter can overlay the image repeatedly or with a reduced opacity. The physical dimensions of your image will not be altered.

Parameter Description
o overlay
i image (image-name)
p (optional) position
o (optional) opacity (0-100)
 
 
/t,t,example,c,f60,p,tl,ox,60,oy,50,fs,40,r,35,s,fff/

Add text to an image

URL: /t,t,example,c,f60,p,tl,ox,60,oy,50,fs,40,r,35,s,fff/

With Intermedia Fotoficient it is easy, to add text to images. Intermedia Fotoficient accesses your available fonts (either in the Java or system directory, depending on the platform).Those can be used to write text in your images. Intermedia Fotoficient pixelates the desired text/font/style in the image. You can choose which color to write in, as well as which color the outline should have. You are free to use any appropriate font size or position.

Parameter Description
t text command
t text value ("example")
c (optional) color (hex-RGB)
p (optional) position (tl, tc, tr, cl, cc, cr, bl, bc, br)
ox (optional) offset-x (pixel)
oy (optional) offset-y (pixel)
fs (optional) font-size
r (optional) rotate (degree)
s (optional) stroke (text outline color in hex-RGB)
 
 
/c,x,347,y,219,w,220,h,307/

Crop an image

URL: /c,x,347,y,219,w,220,h,307/

With the cropping operation, only a specified area of the image is used. This filter will alter the dimension of the image.

Parameter Description
c crop
x Pixel x-coordinate of upper left corner of the desired rectangular cut
y Pixel y-coordinate of upper left corner of the desired rectangular cut
w Width in pixel of the desired rectangular cut
h Height in pixel of the desired rectangular cut
 
 
/cl,b,f60/

Clip an image

URL: /cl,b,f60/

This filter needs a clipping path in order to operate. A clipping path is a vector based area, that describes the pixels, that should visually be used. In jpeg-files, a clipping path may be present and applied. Intermedia Fotoficient may as well create a clipping path for arbitrary shapes or through the operation „round corners“. When no clipping path is present, this operation does not change the image. The area, that is actually cut out of the image, will be filled with transparency or a specified background color.

Parameter Description
cl clip
b (optional) background-color (hex-RGB)
 
 
/p,a,25/

Perspective distortion

URL: /p,a,25/

This filter applies a visual effect to change the perceived perspective of your image. Think of it, as a rotation of your flat image inside a 3d-cube.

Parameter Description
p perspective
a angle (degree)
 
 
/rc,w,50,h,50/cl/

Round corners

URL: /rc,w,50,h,50/cl/

This operation actually creates a new clipping path to the applied image (and replaces any present clipping path). If you need to clip with a present clipping path (that has been defined either within the jpeg-file or through a preceding operation), you have to perform a clip operation at first, before creating a new path. Round corners will change the images four corners to rounded shapes according to a specified height and width.

Parameter Description
rc roundcorners
w width (A positive integer describing the diameter of the horizontally applied round operation)
h height (A positive integer describing the diameter of the vertically applied round operation)
cl clip
 
© 2011 Pixelboxx GmbH