AdmiralAlkex Posted December 14, 2009 Share Posted December 14, 2009 (edited) Last version at post #20I couldn't find any good software for viewing pictures on UMPC and MID devices so I created my own.Graphics are handled with SDL.You'll need to get the following files from my SDL UDF:SDL.au3 & SDL.dllSDL_image.au3SDL_gfx.au3 & SDL_gfx.dllFor full capabilities you also need:SDL_image.dll & jpeg.dll & libpng12-0.dll & zlib1.dllFor ShiftER v6.The code is a bit non-optimal at times, and the caching and animation systems are quite non-flexible. Also the cache is bugged, so don't use that if you need to see the current filename.But it is cpu-friendly, so it will fly by (well not with any fancy animation enabled) even on an Intel A110.It also works good at desktops/laptops/other devices, but there you could use Windows own apps so it would be a bit pointless.I'm planing to redo the HUD so don't get too attached to it (like that guy -> ) .You'll need to get the following files from my SDL UDF:SDL.au3 & SDL.dllSDL_image.au3 & SDL_image.dll & jpeg.dll & libpng12-0.dll & zlib1.dllSDL_gfx.au3 & SDL_gfx.dllSDL_sprig.au3 & sprig.dllRemember that the dll's should be in the same folder as ShiftER. If you don't have the includes there remember to change the paths in the script.Here's a quick tutorial (note that the "controls" are only visible at demand, not all the time!)Also you (should, it may be a bit buggy) have a bettery meter at the bottom if you have a battery, and while in a slideshow you can press on the left 20% of the screen to change speed (everything else disables slideshow).ShiftER v6.au3Last version at post #20 Edited May 5, 2010 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
trancexx Posted December 15, 2009 Share Posted December 15, 2009 (edited) What a cool invisible controls! I like that very much. Once you figure them out all works great (except some pics are rotated). I only have one remark. It's editors gui. I like it this way much more (just PC): $hWnd = GUICreate(@ScriptName & " Playlist editor", 500, 400, -1, -1, -1, 0x00000008) ; $WS_EX_TOPMOST Refreshing. Edited December 15, 2009 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 4, 2010 Author Share Posted February 4, 2010 What a cool invisible controls! I like that very much. Once you figure them out all works great (except some pics are rotated). Sorry to be this late, but thank you for your appreciation. You think you could give this a quick spinn too? What do you think of the third question? @all ShiftER v7 So now when I have everyones attention, what's new in v7? Very little. What changed then? Very much. I decided to get rid of everything that doesn't fit a UMPC, and to simplify things a great deal. Battery-bar should be fixed (if it was ever broken). Slideshow workings changed. Animation is gone. (Optional) rotation is gone. Caching is gone. Most options are gone. UI is redone. Playlist editor is gone. SDL_Sprig no longer used. jpeg.dll, libpng12-0.dll and zlib1.dll is optional. Every line of code was meticulously studied, resulting in many changes in the code. This will have to do as a tutorial this time: (ninjastar = ninjapad). I estimate there will be at least 1 more release before I show this on UMPC targeted forums. The UI needs to be more user friendly, while at the same time providing more controls. Rotation will come back. ShiftER v7.au3 I'm hungry. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
trancexx Posted February 6, 2010 Share Posted February 6, 2010 Sorry to be this late, but thank you for your appreciation. You think you could give this a quick spinn too? Sure.What do you think of the third question? It's not bad. Have seen better though.Btw, I hate inis.I'm hungry.Go eat something. It's crashing on large BMPs (few MB). ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 7, 2010 Author Share Posted February 7, 2010 Sure.Thanks.Btw, I hate inis.Do you have any suggestion for something less "hateable"? I like to have portability so the registry is not very interesting, and XML files are to advanced to save a handful of options.Go eat something. It's crashing on large BMPs (few MB).Yeah I kinda figured that out myself after a while Does it always happen on the same picture? Would you mind sending me it so I could have a look? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
trancexx Posted February 8, 2010 Share Posted February 8, 2010 Does it always happen on the same picture? Would you mind sending me it so I could have a look? It's function _SDL_rotozoomSurface(). Here's PNG, for example, that's crashing for me (dimension related). ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 8, 2010 Author Share Posted February 8, 2010 It's function _SDL_rotozoomSurface().Here's PNG, for example, that's crashing for me (dimension related).Ummm that was kinda strange. I also had the same problem, but I just fixed that like an hour ago.... Or so I thought. There's something in that pic that makes it worse than the ones I had...Why do you think it's the dimensions? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 8, 2010 Author Share Posted February 8, 2010 (edited) This is it, I think I got it. Earlier to night I saw that converting surfaces to 32 bit seemed to fix a lot of crashes. Now I made sure that the size was an even number, and I could display your PNG. I'm not sure this is the best way to fix it, but anyway;Func _SuperLoad() $pLoad = _IMG_Load($aPlayList[$iCurrent]) $hStruct = DllStructCreate($tagSDL_SURFACE, $pLoad) $W = DllStructGetData($hStruct, "w") $Y = DllStructGetData($hStruct, "h") If IsInt($W/2) <> True Then $W -= 1 If IsInt($Y/2) <> True Then $Y -= 1 $pFix = _SDL_CreateRGBSurface($_SDL_SWSURFACE, $W, $Y, 32, $iNull, $iNull, $iNull, $iNull) _SDL_BlitSurface($pLoad, 0, $pFix, 0) _SDL_FreeSurface($pLoad) Return $pFix EndFuncThat works alot better for me.Edit: Meh, still got crashes with other files, forget what I just wrote. Edited February 8, 2010 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
trancexx Posted February 8, 2010 Share Posted February 8, 2010 That pic is 508x1025. If the sum of width and height is over 522729 (more-less) and _SDL_rotozoomSurface() is used it would crash. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 8, 2010 Author Share Posted February 8, 2010 I don't think it's that simple. I have a 15000x7500 bmp and png that works without a problem. I also have a jpg that fails and it's only 376x490. I'm starting to think that SDL_gfx is broken. Shame I can't fix it... And doing the rotation in AutoIt would be to slow. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
trancexx Posted February 8, 2010 Share Posted February 8, 2010 I don't think it's that simple. I have a 15000x7500 bmp and png that works without a problem. I also have a jpg that fails and it's only 376x490.I'm starting to think that SDL_gfx is broken. Shame I can't fix it... And doing the rotation in AutoIt would be to slow.15000x7500 wouldn't use _SDL_rotozoomSurface(). Or it would? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
monoceres Posted February 8, 2010 Share Posted February 8, 2010 Without even reviewing the source, it hasn't got anything to do with some very classic rotating memory problems? http://andhen.mine.nu/av.png Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 8, 2010 Author Share Posted February 8, 2010 15000x7500 wouldn't use _SDL_rotozoomSurface(). Or it would?Errm no it wouldn't, it would use _SDL_zoomSurface I rotated that picture and it doesn't work anymore Without even reviewing the source, it hasn't got anything to do with some very classic rotating memory problems?http://andhen.mine.nu/av.pngI'm not sure how to answer that without knowing C/C++. When the pic is rotated, it's written to a surface that SD_gfx.dll creates itself. And the pic is only rotated 270 degrees, that shouldn't be very hard to calculate... .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 8, 2010 Author Share Posted February 8, 2010 Well it works now (I promise!). They key was to give up... Well sort of. It works if you split it into two steps, as in: $pTemp = _SDL_rotozoomSurface($pSrc, 270, 1, 0);Rotate $pDst = _SDL_zoomSurface($pTemp, $DZ, $DZ, 1);Zoom and Smooth _SDL_FreeSurface($pTemp);Waste disposal It's more work, but I don't see that I have any other choice. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
trancexx Posted February 8, 2010 Share Posted February 8, 2010 Yes, that's working. Nice pic monoceres. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 14, 2010 Author Share Posted February 14, 2010 (edited) Shifter v8I decided to move away from the invisible controls, as they are too hard to use, I keep pressing on the wrong place all the time I guess we could call this release a "sanity check", as I need to make sure I'm not crazy for doing this move.The invisible controls are still there as in v7, except the slideshow-button shrunk downwards, and now covers the third quarter on the Y-axis.The upper 20% of the window is what is really interesting, (left) click and drag down to open the new icon-driven interface. There you can change settings for zoom, rotation, animation, and randomization of playback. Press somewhere on the outside to go back to the normal view. The settings are not (yet) saved.For the future I was thinking I should move all the invis. controls to icons, except exit and ninja-bar. You could then have simple mouse gestures like a sweep to the right to go to next image, while still having everything else another sweep away.ShiftER v8.zipAm I crazy? Edited February 14, 2010 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
trancexx Posted February 15, 2010 Share Posted February 15, 2010 You have Star Trek duck standing on something that appears to be two balls as avatar. Of course you are crazy. click/dragdown sometimes even works for me. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted March 14, 2010 Author Share Posted March 14, 2010 (edited) I have a question for YOU! Yes, I'm pointing at YOU, the reader!What would YOU like to happen when ShiftER is started without any command line parameter(s)?You know, without dragging anything to it.Come on now people, I want lots of ideas, good or bad, crazy or smart, it doesn't matter, just give me ANYTHING.And the winner will get.... Nothing! Edited March 14, 2010 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted April 9, 2010 Author Share Posted April 9, 2010 (edited) Today is a good day to die.Shifter v16Added:*Playlist saved at exit.*Continue old playlist if no command line parameters provided.*Some settings.*Settings are now saved at exit.*Some Basic error resilience + colorful error screen.*Should now work without SDL_Image (not really tested), but then you'll only be able to load bmp files.*Some progress bars.Fixed/Changed:*Randomizing improved.*More touch-screen friendly (sort of, not satisfied with that yet).*Battery-thingy fixed (again!).*Lots of transition-related fixes.*When you press an "Icon" the dialog will not exit automatically (makes it much faster to change multiple settings).Removed:*Animation 3 sucked.Instructions:Next image: Drag left, mouse-button 5 or wheel down.Previous image: Drag right, mouse-button 4 or wheel up."Icon-Interface": Drag down.Exit: Drag up.The Ninja-bar can be found in the bottom right (by default 10 pixels wide and high).Notes:The art for the "Icon-Interface" sucks. Maybe I'll just redo all of them.Download:ShiftER v16.zip(you'll have to take the rest of the graphics from the previous zip, or maybe just try without them ) Edited April 9, 2010 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 4, 2010 Author Share Posted May 4, 2010 (edited) That was a long day.Shifter v28Some text:There was a lot of general cleanup done here. The 4 slowest operations used to be:Loading and Saving to playlist-fileLoading from command lineRandomizing playlist-arrayThese are all now virtually instant. A faster PC needs around 100k items before noticeable slowdowns occur.Added:Some experiments with Static.Another progressbar implemented, set ProgressWay=2 to see.Smarter writing to Settings.ini at exit (useful for SSD and such I imagine) if SmartWrite=1.Slideshow mechanism is finally back.Animations for the Icon-Interface. They're on a Adlib so you can continue clicking without interruption.Fixed/Changed:Vastly improved the progressbars behaviors.New format for playlist-file. Faster and handles practically infinite amount of items.Less global variables due to restructured beginning and main-loop code.Removed:Mouse-Gestures.Instructions:Next image: Press lower half of screen, mouse-button 5 or wheel down.Previous image: Press upper half of screen, mouse-button 4 or wheel up.Icon-Interface: Right-click.Exit: On the Icon-Interface.The Ninja-bar can be found in the bottom right (by default 10 pixels wide and high).Notes:The art for the Icon-Interface was redone.Download:ShiftER v28.zipSo what do you think? Edited May 4, 2010 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now