Sign in to follow this  
Followers 0
AdmiralAlkex

ShiftER

20 posts in this topic

#1 ·  Posted (edited)

Last version at post #20

I 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.dll

SDL_image.au3

SDL_gfx.au3 & SDL_gfx.dll

For full capabilities you also need:

SDL_image.dll & jpeg.dll & libpng12-0.dll & zlib1.dll

For 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.dll

SDL_image.au3 & SDL_image.dll & jpeg.dll & libpng12-0.dll & zlib1.dll

SDL_gfx.au3 & SDL_gfx.dll

SDL_sprig.au3 & sprig.dll

Remember 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!)

Posted Image

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.au3

Last version at post #20

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by trancexx

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

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? :D

@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:

Posted Image

(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.

Share this post


Link to post
Share on other sites

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? :D

It's not bad. Have seen better though.

Btw, I hate inis.

I'm hungry.

Go eat something. :huggles:

It's crashing on large BMPs (few MB).


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

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. :huggles:

It's crashing on large BMPs (few MB).

Yeah I kinda figured that out myself after a while :D

Does it always happen on the same picture? Would you mind sending me it so I could have a look?

Share this post


Link to post
Share on other sites

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).

post-33569-12655902179795_thumb.png


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

#8 ·  Posted (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
EndFunc

That works alot better for me.

Edit: Meh, still got crashes with other files, forget what I just wrote.

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

15000x7500 wouldn't use _SDL_rotozoomSurface(). Or it would?

Errm no it wouldn't, it would use _SDL_zoomSurface :huggles:

I rotated that picture and it doesn't work anymore :D

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

I'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...

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Yes, that's working.

Nice pic monoceres.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

Shifter v8

I 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 :mellow:

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.zip

Am I crazy?

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

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. :mellow:


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

#18 ·  Posted (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! :mellow:

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

Today is a good day to die.

Shifter v16

Added:

*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 by AdmiralAlkex

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

That was a long day.

Shifter v28

Some text:

There was a lot of general cleanup done here. The 4 slowest operations used to be:

  • Loading and Saving to playlist-file
  • Loading from command line
  • Randomizing playlist-array
These 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.zip

So what do you think?

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0