Skip to content

Dynamic image resizing function

This may be a bit niche, but I thought I would float the idea anyway. Could we have an instruction in the script language to dynamically resize an image? A few platforms I've looked through are very strict on image dimensions, and while of course it's possible to resize project images beforehand and put them in a different directory, it would be easier to be able to use whatever existing images we use and resize them on the fly.

I envisage something like this:

[Profile_Image]
type=file
must be filled=1
hint=Choose an image for your profile (also called avatar). It does not (and also should not) have to show you on the picture but something that represents you.
default=general_profile.png
allow html=0
filter=Image files|*.jpg;*.jpeg;*.png;*.gif|PNG|*.png|GIF|*.gif|Jpeg|*.jpg;*.jpeg
resize=120x120

Comments

  • SvenSven www.GSA-Online.de
    I have added it for next update (untested though).
    Thanked by 2cherub Deeeeeeee
  • cherubcherub SERnuke.com
    Wow quick work! I'll be the guinea pig :)
  • cherubcherub SERnuke.com
    Images get resized perfectly! However they get turned into something resembling the magic eye pictures from the 1990s :)

    This was using a spinfolder macro if that may have any effect.
  • DeeeeeeeeDeeeeeeee the Americas
    edited February 14
    I like that sort of digital art/imagery/grafix. Those Magic Eye images were cool. Wonder if there's a generator or algorithm out there for free? I'll look today!
    .....
    The on-the-fly GSA SER image resizing is def a useful feature!   Thanks, Sven! :)






  • SvenSven www.GSA-Online.de
    edited February 15
    Yea, it didn't resolve the macro I guess and then created an image on it's own. Let me fix that in a silent update. When not using a macro, but a real file name as input, it should work in latest version. //silent update is out//
  • cherubcherub SERnuke.com
    I now get error popups when it reaches the step where a resized image should be submitted - have sent a couple of bug reports.
  • SvenSven www.GSA-Online.de
    got them but still unknown what it is...will fix it though somehow.
    Thanked by 1Deeeeeeee
  • SvenSven www.GSA-Online.de
    another silent update is out...please try now.
    Thanked by 2cherub Deeeeeeee
  • cherubcherub SERnuke.com
    Seems to be working well!
    Thanked by 1Deeeeeeee
  • SvenSven www.GSA-Online.de
    phhuuu finally ;) thanks for the feedback
    Thanked by 1Deeeeeeee
Sign In or Register to comment.