CSG6206: Edith Cowan University- Advanced Scripting- Portfolio Assignment Help

Download Solution Order New Solution
Internal Code: 1HBJG

Portfolio Assignment Help:

Task: Task 1: Image Creation Write a script that will convert an array of 1’s and 0’s to a black and white (monochrome) PNG image. Where 1 represents a black pixel and 0 represents a white pixel. The image will be saved to the filename indicated in the first argument. The text file will contain the array of 1s and 0s 10101 01010 10101 01010 10100 An example command line is provided below: printf array.txt | php binary_to_image.php out.png *Note: the above example assumes you were coding your script in PHP, you should use an extension appropriate to the scripting language you select. In this instance your script would create a new image from the standard input provided and draw each pixel one at a time and then write the image as out.png. out Your script should gracefully handle the following exceptions: 1. No argument provided 2. Input provided is not binary 3. Input rows are not all the same size Task 2: 2D Edge Detector Create a script which will detect edges in a 2D set of binary values. You should compare each value to the ABOVE and the LEFT. So if a 1 has a 0 in the position ABOVE or LEFT of itself, then you would output a 1 in that position, indicating an edge (or vice versa). In the instance that there is nothing to the left or above the character being examined, then you should assume that an identical character is in the empty position. To illustrate this please look at the below example: output   *Note: the above example assumes you were coding your script in RUBY, you should use an extension appropriate to the scripting language you select. Exceptions will be tested, you should handle the following: 1. Non-binary input 2. Irregular input, eg: A. 00000000 B. 0001 C. 000000 Note: 1. Efficiency will be graded, primarily – if the PREVIOUS character on the same line does not match, don’t test the one above (or vice versa, depending on your order of comparisons)

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.