Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Rotate multiple jpeg to a desired angle wothout loosing quality 1

Status
Not open for further replies.

peeli

Programmer
Jun 9, 2002
15
0
0
IN
How is it possible to rotate a no of JPGs to a desired angle without loosing quality
 
There are literally hundreds of examples of rotating a bitmap in VB on the web. A quick search on Google or similar should find them. Most work by calculating the necessary mathematical transform, and then applying that transform pixel by pixel against the source image to generate the target image.

In the case of a jpg, you would need to LoadPicture to get a bitmap, do the transform - then find a free jpg library to save the image as a jpg. One that I happen to have liked in the past is available here:
One solution that ought to work (in NT/200/XP) uses the SetWorldTransform api call - but I've never got the call to work successfully from VB. If it did work it would mean that you could set up the required transform in one call, and then apply that transform with a single bitblt.
 
It is theoretically impossible to rotate a .jpg through an arbritary angle without losing quality
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Why not convert the jpg to a bitmap, rotate, then convert back? he he he [fish] No Dolphins were harmed in the posting of this message... Dolphin Friendly Tuna!
 
Well golly bob howdy, it sure does... sorry bout that strongm. [fish] No Dolphins were harmed in the posting of this message... Dolphin Friendly Tuna!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top