Presentation is loading. Please wait.

Presentation is loading. Please wait.

The CILY Programming Language Exactly What the World Needed.

Similar presentations


Presentation on theme: "The CILY Programming Language Exactly What the World Needed."— Presentation transcript:

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) One can perform basic to advanced image manipulation operations using an iterative language (no GUI needed) Very safe, robust and easy to use Very safe, robust and easy to use It’s works cross-platform It’s works cross-platform Unlike Photoshop and Dreamweaver, CILY is FREE! Unlike Photoshop and Dreamweaver, CILY is FREE!

3 Basic CILY Features Loading and saving images (or entire directory of images) for manipulation Loading and saving images (or entire directory of images) for manipulation Selecting rectangle or oval of pixels Selecting rectangle or oval of pixels Resizing, rotating, flipping, blurring, sharpening, brightening, cropping, inverting, edge detecting, and converting to grayscale 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 Getting and setting pixel values of an image Magic wand selection of pixels Magic wand selection of pixels Creating a web album from a directory of images Creating a web album from a directory of images

5 CILY Example: Batch Image Sharpening CILY source code is as follows: 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->color = 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(pixels[j], darkRed); } Paste(i, pixels); SaveAs(i, "earthgray.jpg"); }

7 Output of Previous Example

8 Control Structures Expressions Expressions var int a = foo() + 3 * (a + b); Loops Loops foreach i in imgs { print(imgs[i]->filename); } Functions Functions function void foo() { return; } Library objects and functions Library objects and functions Brighten(image); Color c = Color(255,255,0);

9 Tree Parser Code Gen Error at line 2: a not declared 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"); } AST Lexer/ Parser Compiling CILY Programs main() { var Image i = Open(“blah.jpg”); Blur(i); } Syntax error at line 1: token unexpected ‘.’ Error Check

10 Compiling CILY Programs CILY Program Lexer/ Parser Tree Parser Error Checker Code Gen Syntax Errors Semantic Errors Java program

11 Generated Code Compiler takes CILY program and generates an analogous Java program. Compiler takes CILY program and generates an analogous Java program. Java program compiled and run using J2E 1.4.01 Java program compiled and run using J2E 1.4.01 Java runtime used to run the program. 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 Create photo albums with a call to one CILY library function Different album styles available Different album styles available

14 Testing Automated test suite to run regression tests after every major grammar change. Syntax error checking automatically checked 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. 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 Took a few days to implement, but saved us a lot of valuable time down the stretch

15 Lessons Learned Peer Programming VERY valuable Peer Programming VERY valuable Learned how to “move on” when little errors kept us from shipping. Learned how to “move on” when little errors kept us from shipping. Diff people testing vs. coding Diff people testing vs. coding Learn to trust your group Learn to trust your group Learn to like your group Learn to like your group


Download ppt "The CILY Programming Language Exactly What the World Needed."

Similar presentations


Ads by Google