Giter Site home page Giter Site logo

compressor-head-android's Introduction

Compressor Head Android

Codacy Badge Build Status Gitter chat

Contents

What is compressor-head-android?

Compressor Head on Android is an Android client that generates image URLs for the Compressor Head web application. It takes various specifications of an image such as its URL or source, width, height, and format (PNG, JPEG or WEBP) as arguments to generate a usable image URL in accordance with the dimensions and format specified.

What is Compressor Head?

Compressor Head is a fast web application based on Python to resize images. For a more detailed explanation, visit the Compressor Head project. You can use this to compress images for websites which have a maximum capping for uploading an image or use it to scale up the images.

Setting up the Project

Code Setup

If you want to just download the app

  • Just download .zip file.

If you want to contribute to the project

  1. Fork the repository by clicking on the Fork icon at the top right corner of this page.
  2. Clone the repository on to your local machine by running the following commands on git:
$ git clone https://github.com/[YOUR-USERNAME]/compressor-head-android.git
  1. If you need help, refer Forking and Cloning in git. You can also ask for help on the chat.

IDE Setup

Windows

It is recommanded to use Android Studio:
  1. Download and install Android Studio.
  2. You will also need to download the Android SDK from the IDE itself.
  3. Import the cloned repository into Android Studio by clicking on files --> Open and navigate to the directory where you forked the repository.
You can also choose other preferred IDEs:

Linux

It is recommanded to use Android Studio:
  1. Download and install Android Studio.
  2. You will also need to download the Android SDK from the IDE itself.
  3. Import the cloned repository into Android Studio by clicking on files --> Open and navigate to the directory where you forked the repository.
Setup SDK

Install the packages required to build the android project

sudo apt install android-sdk android-sdk-platform-28
export ANDROID_HOME=/usr/lib/android-sdk
Build the App

Build the app from project

gradle assembleDebug

Running the Application

Windows

Via your own android smartphone.

  • Enable USB Debugging on your phone.

  • Install adb drivers for your smartphone from your manufacturer's website.

  • Click Run on the Android Studio tool bar, or Shift + F10 and then choose your phone to run the app.

By running a virtual device.

  • Setup a Android Virtual Device in the IDE.
  • Click Run on the Android Studio tool bar, or Shift + F10 and then choose the newly created virtual device to run the app.

Linux

Via your own android smartphone.

  • Enable USB Debugging on your phone.

  • Install drivers for your smartphone from manufacturer's website.

  • Install the app with adb (Android Debud Bridge).

adb start-server	# Start the adb server
adb devices		# Check your device is available
adb install -r app/build/outputs/apk/app-debug.apk

By running a virtual device.

  • Install Shashlik
wget http://static.davidedmundson.co.uk/shashlik/shashlik_0.9.3.deb	# Download the deb package
sudo dpkg -i shashlik_0.9.3.deb						# Install the package

sudo apt-get install -f && sudo dpkg -i shashlik_0.9.3.deb		# This step is only if you encounter errors in previous step
  • Run the app
cd app/build/outputs/apk	# Change the directory
shashlik-run app-debug.apk compressor-head-android

Contributing to the project

Step 1: Fork this project:

Go to the top right of the project page and click on "Fork". A fork of this repo will be created on your GitHub account.

Step 2: Code your changes:

Create a new branch by:

git checkout -b YOUR_NEW_BRANCH_NAME

Then create/edit files as per your coding requirements. Ensure that your code is clean and efficient, and avoid redundancies. It is also advised to follow naming conventions as and where specified. Also make sure that your code is your own, and is not closed-source or stolen.

Step 3: Commiting and pushing the changes:

Commit the changes and push the commit to your forked repository on GitHub by:

# for including inidividual files
git add filename.extension
# for including all files at once
git add .
git commit -m"Your commit message here"
git push origin

If stuck at this point, refer here

Step 4: Sending a Pull Request (PR):

Once you are done coding the changes, commit the files and create a PR. Click on "Compare across forks" when creating the PR, and select the master branch of this repo as the base. Set the head to your branch on your fork. Click on the button "Create Pull Request". Give your PR a meaningful title and a brief message explaining the purpose of your commits.

Step 5: Ensuring code quality

Once a PR has been created, check if it can be merged without any issues or conflicts. If there are any issues, repeat from Step 2 and try to resolve them. Wait for a reviewer to cross check your changes, and then merge your changes. Also wait for Codacy Reviewer to review the changes made by your commits and in case of any error fix them first.

  • Additional Reference regarding clone, fork and editing a repository here.
Keep Contributing to open source! =)

Additional Learning

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.