• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

Help on GDI+ Routines

Started by Frank Kelley, September 29, 2010, 01:22:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Frank Kelley

I have a client who has asked me to construct a program under PowerBASIC to do the following:


  • Load a color .JPG photograph into memory
  • Convert a copy of the photo to black and white
  • Make another copy in sepia tones
  • Save the black and white and sepia copies to disc as .JPG files
  • Resize all three photos to smaller versions (not thumbnails)
  • Save all three smaller versions to disc as .JPG files

My experience with GDI+ has been limited to opening files in one format and converting to another (e.g.: .BMP to .JPG). Looking at the GDI+ API, it's difficult to know where to begin. Jose suggested I ask here for some pointers on which GDI+ routines to use to achieve my client's goals.

Any help is sincerely appreciated.

Patrice Terrier

#1
Changing the pixel color could be done working directly with the bitmap stored in memory.
You can learn how to perform color conversion computation here.

Now if you don't want to do all the hard work yourself, then consider using GDImage, and see the PhotoSetup project here.
Note: GDImage uses matrix computation to perform the color conversion.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com