Search found 36 matches

by him21sri
2017-05-17T05:50:12-07:00
Forum: Users
Topic: Get the ppi(pixel per inch) of image using C API
Replies: 13
Views: 14987

Re: Get the ppi(pixel per inch) of image using C API

Yes the resolution type was 0 which is "UndefinedResolution". Even after setting PixelsPerInchResolution as the ImageUnits the result was still 0x0.

But when I do

identify -format "%xx%y" grass.png

I get the result as 118.10999999999999943x118.10999999999999943
by him21sri
2017-05-17T04:56:18-07:00
Forum: Users
Topic: Get the ppi(pixel per inch) of image using C API
Replies: 13
Views: 14987

Re: Get the ppi(pixel per inch) of image using C API

Sorry for not mentioning the API I am using, You assumed correctly that I am using MagickWand functions. I used MagickGetImageResolution but I am getting result as 0.000000 x 0.000000. Please find my sample code below. double xx,yy; MagickGetImageResolution(wand, &xx, &yy); printf("ppi ...
by him21sri
2017-05-17T04:07:25-07:00
Forum: Users
Topic: Get the ppi(pixel per inch) of image using C API
Replies: 13
Views: 14987

Re: Get the ppi(pixel per inch) of image using C API

Hey now I am a little confused of what I am doing. I will try to describe the scenario. Say I have an image of some dimension 100x100 pixels, I want to place some text in the center of this image and I want the text to cover 50% of the image's height leaving 25% space from both top & down, which...
by him21sri
2017-05-16T23:15:24-07:00
Forum: Users
Topic: Get the ppi(pixel per inch) of image using C API
Replies: 13
Views: 14987

Get the ppi(pixel per inch) of image using C API

I am currently using ImageMagick 6.8.9-10 version on linux. I want to get the image's ppi, is there a way to get this info using C api. Please help.
by him21sri
2017-04-21T01:43:24-07:00
Forum: Users
Topic: Make an image semi transparent
Replies: 1
Views: 4030

Make an image semi transparent

I have an image which I want to make that image semi transparent using C api. I am currently on IM - 6.8.9-10 on unix and using wands API to do image manipulations. Please suggest how can I make my image semi transparent.

Image : http://cdn.atomex.net/bookmark.png
by him21sri
2017-04-19T00:15:00-07:00
Forum: Users
Topic: Putting text in a rectangle or an overalyed image
Replies: 18
Views: 21698

Re: Putting text in a rectangle or an overalyed image

Thanks guys, I am able to achieve what I wanted from command line. I want to implement this in C I have figured everything out regarding how to implement this except I am not able to use compose method in C when I want to overlay a image on an background image, I am using https://www.imagemagick.org...
by him21sri
2017-04-18T03:55:17-07:00
Forum: Users
Topic: Putting text in a rectangle or an overalyed image
Replies: 18
Views: 21698

Re: Putting text in a rectangle or an overalyed image

By my understanding annotate will just put text on an image of a defined size but I want the background with some transparency as well, if I set background it will set for the whole image which I don't want. I just want to have a small rectangle at the bottom of image with some color and transparenc...
by him21sri
2017-04-18T03:34:34-07:00
Forum: Users
Topic: Putting text in a rectangle or an overalyed image
Replies: 18
Views: 21698

Re: Putting text in a rectangle or an overalyed image

Anyway I was able to set the transparency externally by using -alpha on -channel A -evaluate set 50% +channel But now I am stuck on another problem say if the text is small say just two letters then the text becomes very large and covers the whole width of image, cant we simply specify the font size...
by him21sri
2017-04-18T03:13:47-07:00
Forum: Users
Topic: Putting text in a rectangle or an overalyed image
Replies: 18
Views: 21698

Re: Putting text in a rectangle or an overalyed image

him21sri wrote: 2017-04-18T02:55:57-07:00 As well as for some reason, for me the text in the black rectangle is not center aligned its touching the upper edge of the rectangle but in your case it is coming proper.
What about this how can I fix for my ImageMagick version?
by him21sri
2017-04-18T03:12:57-07:00
Forum: Users
Topic: Putting text in a rectangle or an overalyed image
Replies: 18
Views: 21698

Re: Putting text in a rectangle or an overalyed image

Ok that worked, this is essentially the alpha value is 0.5 which is making it translucent, cant we set transparency without using rgba color? Because in many instances I might have to use colors other than black, so I will prefer putting the color name as required and setting the transparency with s...
by him21sri
2017-04-18T02:55:57-07:00
Forum: Users
Topic: Putting text in a rectangle or an overalyed image
Replies: 18
Views: 21698

Re: Putting text in a rectangle or an overalyed image

Thanks this worked well. I also want to know what is the best way to make the background of lower rectangle in the above image translucent or set some opacity to it. As well as for some reason, for me the text in the black rectangle is not center aligned its touching the upper edge of the rectangle ...
by him21sri
2017-04-17T22:58:43-07:00
Forum: Users
Topic: Putting text in a rectangle or an overalyed image
Replies: 18
Views: 21698

Re: Putting text in a rectangle or an overalyed image

I was able to host this image and have shared the same in my old comment, here I am attaching again http://cdn.atomex.net/sample.png . In this sample image look at the top right corner there is a small black image on which discount is displayed. So I want to overlay that image on my original image a...
by him21sri
2017-04-17T22:42:16-07:00
Forum: Users
Topic: Putting text in a rectangle or an overalyed image
Replies: 18
Views: 21698

Re: Putting text in a rectangle or an overalyed image

Sorry for not mentioning the platform I am using, I am doing all this on linux. I want the rectangle to cover the whole width of image and text should be placed in center. I also want to overlay a bookmark type small image on top right of my image and display some text in the center of that overlaye...
by him21sri
2017-04-17T21:07:09-07:00
Forum: Users
Topic: Putting text in a rectangle or an overalyed image
Replies: 18
Views: 21698

Re: Putting text in a rectangle or an overalyed image

I have ImageMagick 6.8.9-10 version.

Please help in prototyping at command level I am not sure how I am gonna place the text in the center of rectangle or an overlayed image, I can find the corresponding C function later.
by him21sri
2017-04-17T02:34:16-07:00
Forum: Users
Topic: Putting text in a rectangle or an overalyed image
Replies: 18
Views: 21698

Putting text in a rectangle or an overalyed image

There are two things which I wanna do - 1. So I have an image, I want to draw a rectangle over it with some opacity and put some text in the center of that rectangle 2. Overlay a small image on the original image and then write some text in the center of that overlayed image. Text will be a dynamic ...