evgenyneu / Auk

An image slideshow for iOS written in Swift.
MIT License
277 stars 44 forks source link

Resize Remote Image #45

Open riyanpratamap opened 8 years ago

riyanpratamap commented 8 years ago

Hi,

I have a quick question here. Can I resize image from remote image before it showed? I think it will reduce memory usage on the apps. If there is any way to do it, let me know.

Thank you so much!

evgenyneu commented 8 years ago

Hello @riyanpratama, it is not possible with Auk at the moment, unfortunately. But this is a very good idea for a feature. The Moa, the image downloader used in Auk, already provides a way to manipulate images before they are shown. We can add the same functionality to Auk.

This is a proposed API:

scrollView.auk.show(url: "https://bit.ly/moa_image",
   onSucessAsync:  { image in
    // Called asynchronously when image arrives
    // Manipulate the image and return the result 
    return image
  }
)
riyanpratamap commented 8 years ago

Thank you for your quick response.

Yaa, it will be a great feature for Auk. Good luck, @evgenyneu !

evgenyneu commented 8 years ago

Thanks for awesome idea, I will keep this open, as an enhancement proposal.

riyanpratamap commented 8 years ago

Great! I'll keep watching!

mkaya93 commented 7 years ago

@evgenyneu did you add this to the library ?

evgenyneu commented 7 years ago

Hi @mkaya93, no I have not implemented this feature yet, unfortunately.