how-tos made with markdown snippet injector

This commit is contained in:
Nikolay Iliev
2016-04-14 15:20:35 +03:00
parent 5ceeb7fddd
commit 89fad4f41c
43 changed files with 1207 additions and 1116 deletions

View File

@@ -0,0 +1,25 @@
---
nav-title: "image-source How-To"
title: "How-To"
description: "Examples for using image-source"
---
# Image source
Using the image source requires the image-source module.
<snippet id='imagesource-require'/>
The pre-required `imageSource` module is used throughout the following code snippets.
We also use fs module defined as follows:
<snippet id='imagesource-require-alt'/>
## Loading and saving images
### Load image using resource name
This is similar to loading Bitmap from `R.drawable.logo` on Android or calling `[UIImage imageNamed@"logo"]` on iOS
<snippet id='imagesource-resname'/>
### Load image from URL
<snippet id='imagesource-load-url'/>
### Save image source to PNG or JPG file
<snippet id='imagesource-save-to'/>
### Load image from a local file
<snippet id='imagesource-load-local'/>