reducer's Introduction
{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf100 {\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \f0\b\fs48 \cf0 Reducer \f1\b0\fs24 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural \cf0 Version 1.0\ \ \ "Reducer" is a simple graphics utility that can be used to rescale, adjust, decorate, and save bitmapped images. Through its three custom view classes (CollapsibleBox, HybridImageView, and AnimatingTabView), this example demonstrates:\ \ - using Core Image and AppKit together, and converting between a CIImage and an NSBitmapImageRep (ImageReducer.m)\ - drawing directly into an NSBitmapImageRep using NSGraphicsContext's +graphicsContextWithBitmapImageRep: (ImageReducer.m)\ - using an NSViewAnimation to animate changes to a view's frame (CollapsibleBox.m, MainController.m)\ - using an NSAnimation to drive a Core Image transition filter (AnimatingTabView.m)\ - using NSView's "drawing redirection" methods to acquire a snapshot of a view subtree (AnimatingTabView.m)\ - using an NSOpenGLContext with an ordinary NSView, and alternating between OpenGL and Cocoa/Quartz rendering in the same view (HybridImageView.m)\ - drawing rectangles with rounded corners (NSBezierPathAdditions.m)\ - building a palette for custom views, complete with inspectors for the views' properties (CollapsibleBox.xcode)\ - saving NSBitmapImageRep data to standard-format image files (MainController.m)\ \ "Reducer" also uses Cocoa Bindings extensively in its user interface.\ \ \ \f0\b\fs28 Project Structure \fs24 \ \f1\b0 \ This example contains two Xcode project files:\ \ \f0\b Reducer.xcode \f1\b0 contains a single target for building the "Reducer" application. To produce a self-contained application, this project incorporates the source files for the AnimatingTabView, CollapsibleBox, and HybridImageView classes instead of referencing the CollapsibleBox.framework that's built by the CollapsibleBox.xcode project. (An alternative way of making the application self-contained would be to embed the CollapsibleBox.framework in the application bundle.)\ \ \f0\b CollapsibleBox/CollapsibleBox.xcode \f1\b0 was created using Xcode 2's "IBPalette" project template, to provide an Interface Builder palette for the "CollapsibleBox" custom view (a subclass of NSBox). Files were subsequently added for Reducer's two additional custom views, AnimatingTabView and HybridImageView, but the project name was kept the same. The "IBPalette" template generates a project with two targets: a framework to house the custom views, and a palette that depends on the framework. The palette target produces a ".palette" bundle that Interface Builder will dynamically load at launch time. The palette bundle defines a palette from which prototype instances of the custom controls can be dragged, and provides inspectors that can be used to edit the resultant views' properties. When you build this project, it installs "CollapsibleBox.framework" in ~/Library/Frameworks, and "CollapsibleBox.palette" in ~/Library/Palettes.\ \ \ \f0\b\fs28 Using the Application \fs24 \ \f1\b0 \ 1. Drop an image file into the "Input Image" box at the top of the "Parameters" window.\ \ 2. Configure the settings as desired. Reducer continually updates its preview of the result as you work.\ \ 3. Switch to the "Saving" tab, and save the result as a BMP, JPEG, JPEG 2000, PNG, or TIFF file by giving it a name and clicking the "Save" button. (The result is written to the Desktop.)\ \ 4. Click the "Copy" button if desired, to get an "<img ... />" tag referencing the saved image file that can be pasted into an XHTML document.}
reducer's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.