Print Page | Close Window

Inserting a circular image

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3972
Printed Date: 06 May 24 at 9:02PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Inserting a circular image
Posted By: chris_adsi
Subject: Inserting a circular image
Date Posted: 08 Feb 22 at 2:29PM
Is there a way to insert an image which is itself square, but have it rendered as a circle on the document - for example we have photos staff which we want to place on the document as a circle.

Would this need some sort of image mask? Is that what that function is for?

So the source image is a square jpeg, can we somehow use some sort of mask to just show the circular section in the middle - i.e. cutting all four corners off?

If so what format of image do we need for the mask, should it be same size (pixel dimensions) as the source image etc?

Thanks



Replies:
Posted By: Ingo
Date Posted: 10 Feb 22 at 10:01PM
Perhaps you'll find something here:
https://www.debenu.com/docs/pdf_library_reference/Search.php
In the search field you should insert "Image mask"...



-------------
Cheers,
Ingo



Posted By: chris_adsi
Date Posted: 11 Feb 22 at 8:34AM
Thanks - I had looked at that but I could not work out if it would do what I wanted it to. The help pages are OK, but very "dry" in terms of not offering examples of solutions that can be solved.

In my mind I am thinking insert the square photo image, and then overlay it with an image that is white round the edges but with a transparent circle in the middle, thus letting the underneath image show through - however looking at the Image Mask stuff that seems more suited to blocking out parts of an image?


Posted By: tfrost
Date Posted: 11 Feb 22 at 9:01AM
Disclaimer: I have never used an image mask in QPDF.  But your second paragraph describes effectively what has to be done one way or another; if you choose to use a mask it is just a question of first creating a square mask with a central circle for the area you wish to reveal, instead of a second 'white and transparent' full image. The format for the mask is as described in the documentation. Experiment with a small sample to see how it works, because unfortunately there is no image mask sample among the many supplied.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk