• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Ways to manipulate images using coldfusion

Community Beginner ,
Nov 26, 2021 Nov 26, 2021

Copy link to clipboard

Copied

Coludfusion version: 2018

Goal is to manipulate images when given x and y coordinates from clients for adding text(s) and e-sign or thumbnail images onto parent image without comprimising the resolution (pixels) and dimenssions of the image. I tried all different image functions available with no much luck.

Looking to find solution either by using third party tool, upgrading coldfusion version or purchasing add ons to coldfusion engine. Does any one has any suggustions?

Views

331

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 28, 2021 Nov 28, 2021

Copy link to clipboard

Copied

I think that the use-cases that you mention will be best served by a specialist imaging application or library. You might have to buy it or to pay to use it..

 

Search for one that ticks all your boxes. When you find it, return to the forum and let's discuss whether it can be integrated in ColdFusion. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 02, 2021 Dec 02, 2021

Copy link to clipboard

Copied

What classess does cfimage uses to process images?

ImagePlus and ImageProcessor from ImageJ library was one of my options.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 02, 2021 Dec 02, 2021

Copy link to clipboard

Copied

ImgLib2, ImageIMAJ as well

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 02, 2021 Dec 02, 2021

Copy link to clipboard

Copied

Interested in using the command line?  (This has been our approach for manipulating and generating images and PDFs using ColdFusion 8-2021. This has allowed for more options, faster generation, multithreading & better quality.)

GraphicMagick?  (It's opensource.  I've used this to add text to images.)

 

If you want to create a new image, I've used WKHTMLTOPDF (opensource) to generate PDFs from modern HTML that overlays images & SVG images (with transparancies or alpha channel opaqueness) over other elements. There's also a WKHTMLTOIMAGE executable that would convert the HTML to PNG/JPG. You could use document size and CSS to enforce the same dimensions.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 07, 2021 Dec 07, 2021

Copy link to clipboard

Copied

Thank You for your response. I cannot use commnad line becasue these needs to be built on-demand. I also cannot use HTML because our client provides images

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 07, 2021 Dec 07, 2021

Copy link to clipboard

Copied

I was able to manupulate using image tags and I believe I got most of it working except I cannot use the fonts that I really want to use

local.dupImage = arguments.coldfusionImage;
local.imageInfo = ImageInfo(local.dupImage);
ImageSetAntialiasing(local.dupImage);
ImageSetDrawingColor(local.dupImage,arguments.lineConfig["lineColor"]);
//Had to use bufferImage and other objects to correctly determine x and y coordinates.
//Used this as basis https://www.bennadel.com/blog/1150-gettextdimensions-for-finding-coldfusion-image-text-dimensions.htm
local.attributeCollect = {};
local.attributeCollect["font"] = arguments.lineConfig["lineFont"];
local.attributeCollect["size"] = arguments.lineConfig["lineFontSize"];
local.attributeCollect["style"] = arguments.lineConfig["lineFontStyle"];
local.dupImage.drawText(arguments.lineConfig["lineText"], local.xCenterFinal, local.ycenter,local.attributeCollect);

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 09, 2021 Dec 09, 2021

Copy link to clipboard

Copied

LATEST

Thanks for sharing that.

Which fonts do you want to use?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation