The CILY Programming Language - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

The CILY Programming Language

Description:

Creating a web album from a directory of images. CILY Example: Batch Image Sharpening ... Different album styles available. Testing ... – PowerPoint PPT presentation

Number of Views:13
Avg rating:3.0/5.0
Slides: 15
Provided by: edward131
Category:

less

Transcript and Presenter's Notes

Title: The CILY Programming Language


1
The CILY Programming Language
  • Exactly What the World Needed

2
Why Use CILY?
  • One can perform basic to advanced image
    manipulation operations using an iterative
    language (no GUI needed)
  • Very safe, robust and easy to use
  • Its works cross-platform
  • Unlike Photoshop and Dreamweaver, CILY is FREE!

3
Basic CILY Features
  • Loading and saving images (or entire directory of
    images) for manipulation
  • Selecting rectangle or oval of pixels
  • Resizing, rotating, flipping, blurring,
    sharpening, brightening, cropping, inverting,
    edge detecting, and converting to grayscale

4
More Advanced Features
  • Getting and setting pixel values of an image
  • Magic wand selection of pixels
  • Creating a web album from a directory of images

5
CILY Example Batch Image Sharpening
  • CILY source code is as follows
  • main() array Image imgs
    OpenDir(c\) foreach i in imgs
    Sharpen(i) Save(i)

6
Example CILY Syntax
  • function void ConvertToColor(Pixel p, Color c)
  • p-gtcolor c
  • return
  • main()
  • var Image i Open("images_original/earth.jpg")
  • var Color black Color(0,0,0)
  • var Color darkRed Color(130, 25, 25)
  • ConvertToGrayScale(i)
  • array Pixel pixels MagicWand(i, Color(0, 0,
    0), 10)
  • foreach j in pixels
  • ConvertToColor(pixelsj, darkRed)
  • Paste(i, pixels)
  • SaveAs(i, "earthgray.jpg")

7
Output of Previous Example
8
Control Structures
  • Expressions
  • var int a foo() 3 (a b)
  • Loops
  • foreach i in imgs print(imgsi-gtfilename)
  • Functions
  • function void foo() return
  • Library objects and functions
  • Brighten(image)Color c Color(255,255,0)

9
Compiling CILY Programs
main() var Image i Open(blah.jpg)
Blur(i)
Syntax error at line 1 token unexpected .
import java.io. public class test2 public
static void main(String args) try
CILYImage i CILYLibrary.Open("blah.jpg")
CILYLibrary.Blur(i) catch
(ArrayIndexOutOfBoundsException aioobe)
System.err.println("RUNTIME ERROR Array index
out of bounds") catch (Exception e)
System.err.println("RUNTIME ERROR Unable
to read or write to file")
Error at line 2 a not declared
10
Compiling CILY Programs
Lexer/Parser
Tree Parser
CILY Program
Error Checker
Code Gen
Syntax Errors
Semantic Errors
Java program
11
Generated Code
  • Compiler takes CILY program and generates an
    analogous Java program.
  • Java program compiled and run using J2E 1.4.01
  • Java runtime used to run the program.

12
Some examples of what CILY can do
13
Photo Album Creator
  • Create photo albums with a call to one CILY
    library function
  • Different album styles available

14
Testing
  • Automated test suite to run regression tests
    after every major grammar change. Syntax error
    checking automatically checked
  • Semantic error checking was done partially
    automatically, partially manually.
  • Took a few days to implement, but saved us a lot
    of valuable time down the stretch

15
Lessons Learned
  • Peer Programming VERY valuable
  • Learned how to move on when little errors kept
    us from shipping.
  • Diff people testing vs. coding
  • Learn to trust your group
  • Learn to like your group
Write a Comment
User Comments (0)
About PowerShow.com