How to apply an angle rotation into a 1bpp tif image

Discussions about image processing and document imaging.
Post Reply
shauns
Posts: 21
Joined: Fri May 25, 2007 3:43 pm
Location: North West England

How to apply an angle rotation into a 1bpp tif image

Post by shauns » Fri May 25, 2007 3:46 pm

When I attempt to rotate a tiff image I receive an out of memory error both in your samples and my code. Does gdpicture pro support the rotation of tif files. If so how do I do it.

Thanks

Shaun

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Fri May 25, 2007 4:05 pm

What is the code you are using to do that ?

Could you send me by email the tif file you are trying to rotate at esupport (at) gdpicture (dot) com ?

Best regards,

Loïc

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Fri May 25, 2007 4:26 pm

Ok Thanks for your mail.

I've understood your problem.

You want to make an angle rotation which is not a Std 90, 180.. rotation into an indexed color image using an old gdiplus.dll edition.

First, you are using an old version of GdPicture Pro. If you run your code with the last edition the error no will be 60 instead 3.



Error 60 are defined here: https://www.gdpicture.com/references/gdp ... tatus.html

Error code 60: PixelFormatMustBeConverted (This error can occurs with old gdiplus.dll version). You need to convert image pixel format to 16, 24, 32 or 64.

To resume:

You have just to convert the image pixel format to a non indexed palette (16bpp, 24bpp, 32 bpp...) before aplying the angle rotation.
https://www.gdpicture.com/references/gdp ... 16Bpp.html
https://www.gdpicture.com/references/gdp ... 24Bpp.html
https://www.gdpicture.com/references/gdp ... 32Bpp.html
https://www.gdpicture.com/references/gdp ... 48Bpp.html
https://www.gdpicture.com/references/gdp ... 64Bpp.html

After the rotation you can return to 1bpp image pixel format calling the ConvertTo1bppFast() method https://www.gdpicture.com/references/gdp ... pFast.html

I hope I was clear enought.

Best regards,

Loïc Carrère

shauns
Posts: 21
Joined: Fri May 25, 2007 3:43 pm
Location: North West England

Post by shauns » Fri May 25, 2007 4:34 pm

Wow!

What a turn round time. I'm going to try it now.

Many, many thanks

regards

Shaun

shauns
Posts: 21
Joined: Fri May 25, 2007 3:43 pm
Location: North West England

Post by shauns » Fri May 25, 2007 4:43 pm

Your solution works perfectly

Many thanks

Shaun

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Fri May 25, 2007 4:46 pm

Good! :wink:

Thank you very much for the return.

Loïc

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest