Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
stottle  
#1 Posted : Tuesday, January 10, 2017 8:21:04 AM(UTC)
stottle

Rank: Newbie

Groups: Member
Joined: 1/10/2017(UTC)
Posts: 3

Thanks: 1 times
Hi

I would like to convert TIFF images with a clipping path to JPEG while keeping the clipping path. Is this possible, and if so, how?

I note there a similar questions on the forum, but they are many years old and i now hope this is available.

Thanks in advance

stottle

Fedor  
#2 Posted : Tuesday, January 10, 2017 10:55:18 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Hey,

Yes, it is possible to copy Adobe resources which contain a clipping path information:

https://www.graphicsmill...s/metadata/clipping-path

Please see the CopyClippingPath and CopyClippingPathMemoryFriendly methods. Sure you should use TiffReader instead of JpegReader.

Edited by user Tuesday, January 10, 2017 11:03:56 AM(UTC)  | Reason: Not specified

Best regards,

Fedor Skvortsov

thanks 1 user thanked Fedor for this useful post.
stottle on 1/11/2017(UTC)
stottle  
#3 Posted : Wednesday, January 11, 2017 9:50:46 AM(UTC)
stottle

Rank: Newbie

Groups: Member
Joined: 1/10/2017(UTC)
Posts: 3

Thanks: 1 times
Many thanks for the reply Fedor, I've achieved the result i wanted with the following

Code:
using (var reader = new TiffReader(sourceImagePath))
using (var writer = new JpegWriter(outImagePath))
using (var colorConverter = new ColorConverter(writer.GetAppropriatePixelFormat(reader.PixelFormat)))
{
    writer.AdobeResources = reader.AdobeResources;

    Pipeline.Run(reader + colorConverter + writer);
}

Edited by moderator Wednesday, January 11, 2017 7:19:14 PM(UTC)  | Reason: Not specified

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.