Code Monkey home page Code Monkey logo

hanekeswift's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hanekeswift's Issues

Format<T>

Format currently has logic that is specific to images. This will have to go elsewhere. Maybe into something like ImageTransformer : Transformer, of which Format has an instance.

UIImageView format

Allow to associate a format with a UIImageView. Return a format that describes the UIImageView if none is given.

Add image formats to Cache

Formats acts as cache buckets, a secondary key for setting/fetching/removing objects from the cache.

For the scope of this issue, formats must have a name which should be also the name of the directory where its images are stored.

In the original Haneke, only Cache knows about formats. Each format has its DiskCache, so DiskCache doesn't know about them.

Shared cache

Singleton cache to be used in UIKit extensions.

Not happy with the name Entity. Should we rename?

The name Entity does not convey the responsibilities declared by the protocol. It's too vague. Should we rename it?

Ideas:

  • Fetcher: an entity basically fetches and object to be cached
  • Cacheable
  • CacheObject (should be CacheImage, but I'm thinking of Cache being generic)
  • LazyObject

Should we prefix extension functions?

Should we prefix extension functions? E.g., hnk_hasAlpha in the UIImage extension.

On one hand Swift is not dynamic so collisions would generate compiler errors.

On the other hand, I have no idea what would happen if compiled code runs in a future iOS version in which one of our extension methods is added.

Image resizing

Support image resizing by specifying the desired image size in the format.

Images must be resized in background prior to being cached.

Introduce entities

Entities should be objects that know how to fetch an image asynchronously. These can be given to the Cache instead of a key when fetching.

Image scaling modes and upscaling

Support scaling modes by specifying them in formats. In particular: Fill, Aspect fill, Aspect fit, and No scaling.

Additionally, allow formats to define if images can be upscaled or not.

Parent format

Allow formats to have a "parent" format. If an image is not available in the cache, Haneke should attempt to create it from the parent format (if any). This should work recursively.

For example, this is useful when you have a "fullsize" format and a "thumbnail" format. "fullsize" would be the "thumbnail" parent.

This feature is not currently available in the original Haneke.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.