News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Edit .jpg , .bmp Files

Started by cman, June 18, 2010, 04:14:36 PM

Previous topic - Next topic

cman

How does one open , edit and save image format files like jpg or bmp? Thanks for any information!

dedndave

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

FORTRANS

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.

Farabi

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.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

donkey

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.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

dedndave

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

Farabi

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.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"