The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: cman on June 18, 2010, 04:14:36 PM

Title: Edit .jpg , .bmp Files
Post by: cman on June 18, 2010, 04:14:36 PM
How does one open , edit and save image format files like jpg or bmp? Thanks for any information!
Title: Re: Edit .jpg , .bmp Files
Post by: dedndave on June 18, 2010, 05:27:12 PM
MS Paint is one simple answer

i use a number of programs
long ago, i compared how well each one did different tasks
when i an being picky about the results, i use the program that seems to do the best job for each task

for example, i use an old program called PicView to convert between file types
it uses a library called SKY32V3C.DLL that does a great job of conversion
i think that LIB is still available, today, if you google around

for rotating images, i use a program called ImageExpert
it can rotate very large BMP files (i enlarge before rotation sometimes)
it does pretty well, but only rotates in one-degree increments
i may write my own program to do rotation, one day
i would make it so you sould specify the rotation angle as a float
Title: Re: Edit .jpg , .bmp Files
Post by: FORTRANS on June 18, 2010, 09:46:43 PM
Hi,

   One of the graphics tools I use is the Generalized Bitmap Module
(GBM).  It does a good job on some things.  And it has the source
code available.

http://heikon.home.tlink.de/

Steve N.
Title: Re: Edit .jpg , .bmp Files
Post by: Farabi on June 18, 2010, 10:05:27 PM
Load the file to memory and then use BitmapFromMemory from the masmlib package for reading it.
And use GDI+ to save it to jpg back or use DonkeyGraphic Lib for writing it to bmp. It is very simple.
Title: Re: Edit .jpg , .bmp Files
Post by: donkey on June 19, 2010, 05:37:36 AM
Quote from: dedndave on June 18, 2010, 05:27:12 PM
for rotating images, i use a program called ImageExpert
it can rotate very large BMP files (i enlarge before rotation sometimes)
it does pretty well, but only rotates in one-degree increments
i may write my own program to do rotation, one day
i would make it so you sould specify the rotation angle as a float

Hi Dave,

The rotate function (GetRotatedBitmap) from my graphics library will rotate a 32 bit DIB section in radians using a REAL4 float as the angle. I got it from a C routine by Zafir Anjum but after the conversion and some changes it bears little resemblance to his original routine. You're free to use it if you like but you will have to convert it to MASM syntax.
Title: Re: Edit .jpg , .bmp Files
Post by: dedndave on June 19, 2010, 05:54:26 AM
Thanks again, Edgar
i understand the conversion process fairly well
i worked on some hardware to perform similar conversions for bio-medical ultrasound machines in real-time
for one type of sensor, the image came in as polar data (rotating head sensor used for cardiology)
we had to convert it to x-y for display (rastor-scan, actually)
some of the guys used to call me "Mr. Scan Converter" - lol
i will have to have a look at your routine   :U
Title: Re: Edit .jpg , .bmp Files
Post by: Farabi on June 19, 2010, 02:12:28 PM
We could use a 12 MB rotation table to speed up the rotation process. But the limitation is it only for at maximum 1024x1024 resolution.