I am assuming that anyone using this effect has an app that can remove background areas from an image. I could be wrong. In the next week I will post a program to do that very thing. Meanwhile the final two photo attachments can be used as sample images to test the program.
1. Screen shot of zoom effect without final stamp of cutout.
2. Screen shot of zoom effect with final stamp of cutout (default).
3. Cutout (image with transparent background) - Name this file "painter.png" and save it in the same location as the program.
4. Original image - Name this file "Phaedra.jpg" and save it in the same location as the program.
Our beloved Labradoodle, Phaedra (fay'-dra)
Code: Select all
/* Photo Zoom-In by rbytes December 2018 Creates a dynamic zoom-in effect on a photo and saves a .jpg image. Results are best if you stamp a sprite of the same image with the background removed. Tap the screen to end the program. */ OPTION SPRITE POS CENTRAL laun$=LAUNCHER$ () SET TOOLBAR OFF GET SCREEN SIZE sw,sh itest=0 IF itest THEN sw=568 sh=320 ENDIF rw=sw/1024!rh=sh/768 alf =.05*(1/rw) N$="Phaedra.jpg" S$="painter.png" GRAPHICS GRAPHICS CLEAR ' create the zoom effect using the complete image 'GRAPHICS MODE MULTIPLY ' uncomment for a more dynamic look GET IMAGE N$ SIZE WI,HI SPRITE "main" LOAD N$ SPRITE "main" SHOW FOR t=0 TO 100 'STEP 2 SPRITE "main" AT sw/2,sh/2 SCALE (sw/WI)*t/100 SPRITE "main" ALPHA alf SPRITE "main" STAMP NEXT t ' load the same image with the background removed (made transparent). ' this section can be commented out if you wish GET IMAGE S$ SIZE WI,HI SPRITE "trans" LOAD S$ SPRITE "trans" ALPHA .5 SPRITE "trans" AT sw/2,sh/2 SCALE sw/WI SPRITE "trans" SHOW GRAPHICS SAVE 0,0, sw,sh TO "photo zoom-in.jpg" wait:SLOWDOWN!GET TOUCH 0 AS tx,ty!IF tx=-1 THEN wait IF laun$="desktop" THEN IF FILE_EXISTS("/launch") THEN RUN "/-Launch.sb" ELSE EXIT ENDIF ENDIF END