Giter Site home page Giter Site logo

alisheikh / magicktiler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from magicktiler/magicktiler

0.0 1.0 0.0 30.96 MB

A Java tool and embeddable library for converting images into formats suitable for publishing as zoomable Web images.

License: Other

Shell 0.02% Java 94.26% Scala 5.72%

magicktiler's Introduction

MagickTiler - README

MagickTiler is a Java library and utility for converting image files into formats suitable for publishing them as high-resolution, zoomable Web images. It includes options for batch processing and quality control, and supports a wide range of image formats.

Dependencies

MagickTiler uses GraphicsMagick to perform image manipulation (resizing, cropping, etc.) Make sure you have GraphicsMagick installed on your system!

http://www.graphicsmagick.org/

For convenience, the free Zoomify Express Viewer is packaged with MagickTiler. Note that this software has its own licensing terms defined in the accompanying 'license_Zoomify.txt' file in the 'zoomify' folder. You can always download the latest version of this viewer for free at:

http://www.zoomify.com

License

MagickTiler is licensed under the EUPL, Version 1.1 (http://ec.europa.eu/idabc/eupl).

IMPORTANT: The 'zoomify' folder contains a Flash (*.swf) file that is not part of the MagickTiler software. This file is copyright by Zoomify Inc. and covered by its own licensing terms. Please refer to the accompanying Zoomify License Agreement 'license_Zoomify.txt' for details.

Features

  • Converts to TMS, Zoomify, and Google Maps tiling schemes
  • Converts to Pyramid TIFF (PTIF) image format
  • Fully embeddable in your own Java app
  • Usable as a command-line utility
  • Extensible to other tiling schemes and formats

CLI and GUI Usage

MagickTiler can be used from the command line prompt using the command 'java -jar magicktiler.jar', plus appropriate options.

Example:

java -jar magicktiler.jar -s tms -f jpeg -p -i images

The example command will create TMS tilesets (with JPEG tiles) for each file in the folder 'images'. A preview HTML file will be added to each tileset.

Command options:

-h .... displays help text
-i .... input file or directory
-o .... output directory (for tilesets) or file (for PTIF)
-s .... selects the tiling scheme ('tms', 'zoomify','gmap' or 'ptif')
-f .... selects the tile image format ('jpeg' or 'png')
-q .... sets the JPEG compression quality from 0 (low) to 100 (high)
-b .... selects a background color (if applicable for the selected tile scheme)
-p .... generates an HTML preview file
-g .... starts the GUI
-l .... writes all relevant reporting information to a log file
-v .... validate instead of convert: checks existing tilesets and generates a report about their correctness/integrity

Library Usage

MagickTiler can also be used as a Java library. Just add the magicktiler-lib-.jar to your build path and you're good to go. Here is a simple code example for generating Google Map tiles. It works in the same way for all other tiling schemes (just replace the GoogleMapsTiler with a TMSTiler, ZoomifyTiler, PTIFTiler, etc.).

public static void main(String... args) {
    try {
        File input = new File("/path/to/your/image.jpg");
        File output = new File("/tileset/output/path");
    
        MagickTiler tiler = new GoogleMapsTiler();
        // optional settings (these are the default values)
        tiler.setTileFormat(ImageFormat.JPEG);
        tiler.setJPEGCompressionQuality(75);
        tiler.setBackgroundColor("#ffffffff");
        tiler.setWorkingDirectory(new File("."));
        tiler.setGeneratePreviewHTML(true);
              
        // create the tiles
        TilesetInfo info = tiler.convert(input, output);
    } catch (TilingException te) {
        te.printStackTrace();
    }
}

Build Instructions

MagickTiler is built using Ant. The following build targets exist:

- build:dist ... creates the MagickTiler distribution bundle
- build:lib .... creates the embeddable library file without dependencies
- test ......... runs JUnit tests
- doc .......... generates JavaDoc

The distribution bundle includes an executable .jar file (called magicktiler.jar) with all dependencies included. Use this file in case you want to use MagickTiler as a command-line tool.

The MagickTiler embeddable library file (called magicktiler-lib-.jar) is for use in your own Java applications. It does not include any external dependencies. To use MagickTiler in your own applications, you need to add the embeddable library .jar and the following dependencies to your project build path:

  • im4java-1.1.0.jar
  • log4j-1.2.15.jar
  • commons-cli-1.2.jar
  • xstream-1.3.1.jar
  • scala-library.jar (optional)
  • scala-swing.jar (optional)

All these files can be found in the /lib folder of the MagickTiler project. If you like to build the executable or the embeddable jar without the dependency to Scala, you will have to exclude the GUI from the build. You can achieve this by passing the -Dinclude.gui=false property to Ant.

magicktiler's People

Contributors

csadilek avatar manuelbernhardt avatar errai-gerrit avatar

Watchers

ali 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.