GithubHelp home page GithubHelp logo

android_image_handling's Introduction

android_image_handling

NOT READY TO USE YET !!!!!!

This started out as a fork of : parallel-6/gradle_simple_crop_image_lib . This lib had a few problems, specially related to memory management when handling big images if a programmer didn't want to lose much resolution. This lead me to look for alternatives to handling images without running into OutOfMemory errors all the time. I came accross this post by Android-Developer on StackOverflow which has some really cool native c code that was easy to modify and use with simple_crop_image_lib, this StackOverflow post eventually turned into a lib aswell: AndroidJniBitmapOperations.

So in this lib we have a native implementation of a BitmapHolder that allows for the following operations done in Native:

  • Clock Wise Rotation
  • Counter Clock Wise Rotation
  • Cropping of Image

Regarding the CropImage Activities and stuff, it was modified to :

  • use a bit higher resolution images (2048 instead of 1024)
  • use 1024 as fallback in case 2048 generates OOM
  • use the native operation instead of the android SDK image manipulation, when possible

So, overall, this is not my original work, it is bits and pieces from other peoples work put together to make something a bit better. I improved stuff to fit my needs, and also implemented some more functionalities that i required. So, credit where it is due:

Original Work :

Compiling Native Bits

I've already provided a compiled native library in the repository, but if you would like to compile it yourself and make some changes then you'll need to download the Android Native SDK. Once you have the NDK installed, just go into the jni folder and run ndk-build. The output should look something like this:

rui@laptopjbay:~/projects/android_image_handling/jni$ /home/rui/Software/adt-bundle-linux-x86_64-20130219/android-ndk-r9/ndk-build 
Compile++ thumb  : JniBitmapOperations <= JniBitmapOperations.cpp
StaticLibrary  : libstdc++.a
SharedLibrary  : libJniBitmapOperations.so
Install        : libJniBitmapOperations.so => libs/armeabi/libJniBitmapOperations.so
rui@laptopjbay:~/projects/android_image_handling/jni$

that is it !

android_image_handling's People

Contributors

syshex avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.