The MASM Forum

General => The Campus => Topic started by: Guenther78 on September 20, 2014, 04:25:05 AM

Title: Slideshow
Post by: Guenther78 on September 20, 2014, 04:25:05 AM
Hallo Masm Forum,

now it is time for my next Assembler Project. I would like to made an slideshow. Bill Cravener has one example, I think it was called Animation, where different pictures are shown after each other. Only the time between these should be decreased.
But the pictures are from a resource. I want to show the pictures from a Folder. The user should say, which pictures the slideshow contains.
I know, a program don't need to be developed for a slideshow, You can also use Windows Media Center.

But I want to implement a special Feature. I want the pictures not to cange in one step, I want them to change "continuously". I think, it is called Alpha blending.
To load a Bitmap from a file and not from a resource I have to use the LoadImage function instead of the LoadBitmap function.
I have no code written yet, I only started this threat to make sure that I start coding!!!

Best regards,

Günther
Title: Re: Slideshow
Post by: dedndave on September 20, 2014, 04:48:01 AM
i sometimes use an old program called PicViewer (win98 days)

http://math.uwb.edu.pl/ftp/windows/software/picviewlite/ (http://math.uwb.edu.pl/ftp/windows/software/picviewlite/)

copy all the files into a folder
for each file, properties - unblock

it will run slideshows at faster speeds (View menu - Options to set delay)

i disassembled part of it, once, because i was curious how the GIF files were decoded
it uses the IImage interface, which can load BMP, PNG, GIF, JPG, TIF, and a few other formats
Title: Re: Slideshow
Post by: hutch-- on September 20, 2014, 12:12:32 PM
I think if you use LoadImage from files with the images being loaded as RGBA you can used fade ins and fade out between the display of each image. There are probably more complex routines that will do the continuous change that you mentioned but I don't know of any that are handy.
Title: Re: Slideshow
Post by: TouEnMasm on September 20, 2014, 04:37:46 PM
It is already done and no matter if it is a resource or a file.
http://masm32.com/board/index.php?topic=1917.msg19916#msg19916 (http://masm32.com/board/index.php?topic=1917.msg19916#msg19916)
support all the windows images formats and allow direct access in graphic memory.
Title: Re: Slideshow
Post by: Guenther78 on September 20, 2014, 09:49:01 PM
Thanks for the answers!

@ToutEnMasm
I have downloaded Your example. And the neede full SDK translate (from http://masm32.com/board/index.php?topic=563.msg4563#msg4563) also. I will try it now.

Best regards,

Günther
Title: Re: Slideshow
Post by: jj2007 on September 21, 2014, 12:01:19 AM
There is also \Masm32\examples\exampl03\animate\animate.asm explaining the basic techniques.