Takes a bunch of images and creates card sheets with them. Keeping true to the dpi and card sizes.
Input must have 11 arguments:
- cardWidth (decimal; inches)
- cardHeight (decimal; inches)
- dpi (whole number)
- guideLineSize (decimal, inches, 0 == no guide lines)
- borderSize (decimal; inches)
- paperWidth (decimal; inches)
- paperHeight (decimal; inches)
- separatorSpace (decimal; inches)
- contentOffsetX (decimal; inches)
- contentOffsetY (decimal; inches)
- downscaleResamplingFilter (string)
- upscaleResamplingFilter (string)
- Supported Filters:
- Box
- Triangle
- Hermite
- Bell
- CubicBSpline
- Lanczos3
- Mitchell
- Cosine
- CatmullRom
- Quadratic
- QuadraticBSpline
- CubicConvolution
- Lanczos8
- image array with images in base64
[img1blah+blah=, img2blah+blah=, img3blah+blah=]
Output is a json with a list of images in base64:
{
"cardSheets": [
"imgSheet1blah+blah=",
"imgSheet2blah+blah="
]
}
We take your images and it:
- Trims them to remove any padding
- Scales them to fit cardWidth/cardHeight - cardBorder (using aspectFit ratio)
- Adds padding to fit cardWidth/cardHeight exactly. This creates the border.
- Adds Guidelines to the corners of the card
- Tiles the cards into 3x3 sheets (defined by paper width and height)
- Here it is also separates the cards using Separator Space
Heres an example for these settings:
- 2.5
- 3.5
- 60
- 0.05
- 0.15
- 8.5
- 11
- -0.01667 (negative separator space causes guidelines to overlap)
- 0
- 0
- Lanczos3
- Mitchell
- 9 images
- Accept Json Input
- Make a non-microservice version that's user friendly
- Support manual tiling specifications, so the user can decide between 3x3 or 4x2
- Add an auto tiling mode which will automatically try to find the best tiling method to fill the paper
- Clone the project:
git clone https://github.com/izackp/CardSheetGenerator.git
cd CardSheetGenerator/
git submodule update --init --recursive --depth 1
cd ThirdParty/FullSerializer/
git config core.sparsecheckout true
echo Source > ../../.git/modules/ThirdParty/FullSerializer/info/sparse-checkout
git read-tree -mu HEAD
- Open ImageReality.sln in Xamarin Studio
- Uncomment
//args = Sample ();
for testing - Build!
- Images will also be saved as PNGs in the runtime directory