Loading...

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

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

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

Postby 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
Quis custodiet ipsos custodes
shauns
 
Posts: 21
Joined: Fri May 25, 2007 3:43 pm
Location: North West England

Postby 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
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby 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: http://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.
http://www.gdpicture.com/references/gdp ... 16Bpp.html
http://www.gdpicture.com/references/gdp ... 24Bpp.html
http://www.gdpicture.com/references/gdp ... 32Bpp.html
http://www.gdpicture.com/references/gdp ... 48Bpp.html
http://www.gdpicture.com/references/gdp ... 64Bpp.html

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

I hope I was clear enought.

Best regards,

Loïc Carrère
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby 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
Quis custodiet ipsos custodes
shauns
 
Posts: 21
Joined: Fri May 25, 2007 3:43 pm
Location: North West England

Postby shauns » Fri May 25, 2007 4:43 pm

Your solution works perfectly

Many thanks

Shaun
Quis custodiet ipsos custodes
shauns
 
Posts: 21
Joined: Fri May 25, 2007 3:43 pm
Location: North West England

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

Good! :wink:

Thank you very much for the return.

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest

cron