Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • PhoneGap By Example
  • Toc
  • feedback
PhoneGap By Example

PhoneGap By Example

By : Andrew Kovalenko
close
PhoneGap By Example

PhoneGap By Example

By: Andrew Kovalenko

Overview of this book

PhoneGap is a free and open source framework that allows you to create mobile apps using standardized web APIs for the platforms you care about. It is one of the first and fastest spreading tools to develop hybrid applications using CSS, JavaScript, and HTML, without losing the advantages of native applications. If you are already a web developer, this book will provide you with the skills you need to create, customize, test, and deploy hybrid mobile applications. Starting from the beginning, this book will cover how to set up your PhoneGap development environment, add mobile web frameworks and plugins, design and customize the application layout, and utilize the embedded features of the PhoneGap framework. By working through the steps in each chapter, you will quickly master a variety of mobile applications with totally different approaches. You will then learn how to develop a PhoneGap plugin with native interfaces for iOS and Android, as well as common approaches to test PhoneGap applications. With ample screenshots that show you how to build a phenomenal application, PhoneGap by Example will ensure your success with this cutting-edge mobile development framework for hybrid applications.
Table of Contents (12 chapters)
close
11
Index

An overview of the Pixastic library


We would like to easily apply image filters to the pictures we get from the camera on our device. After some research on the Web, I was able to find an awesome library named Pixastic.

Tip

You can download the latest library files from the GitHub repository at https://github.com/jseidelin/pixastic.

It uses HTML5 Canvas for image processing. There are different scenarios for the library usage, but I selected the one with web workers. A web worker is a JavaScript code running in the background without blocking the web page and without affecting the performance of the page. For me, it seems to work best for mobile devices. There are four main files needed:

  • pixastic.js: This is the main file with basic logic

  • pixastic.effects.js: This file affects logic and pixel processing

  • pixastic.worker.control.js: This is used as the control of the worker

  • pixastic.worker.js: This is the worker file itself

Here is a simple example of the Pixastic library usage, which we will...

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete