CSG6206 – Advanced Scripting Portfolio 3 IMPORTANT When completing portfolio 2 you may select any ONE of the TWO tasks included in this document. Each task has its own set of requirements which you...

1 answer below »
you need to developany of one program in PHP.


CSG6206 – Advanced Scripting Portfolio 3 IMPORTANT When completing portfolio 2 you may select any ONE of the TWO tasks included in this document. Each task has its own set of requirements which you should make sure that you understand. Marking Rubric Criteria (Marks Possible) Excellent (80-100%) Good (60-79%) Fair (50-59%) Poor (0-49%) Execution (4) Program executes correctly with no errors Program executes with one easily fixed error Program executes with a few minor, easily fixed errors Program does not execute Output (4) Program displays all required output in a well-designed manner, meeting all specifications Program displays all required output in a well-designed manner Program displays all required information Program does not display all required information Logic (4) Program logic is efficient and well designed Program logic is well designed Program logic meets requirements Program logic does not meet requirements Standards (4) Program style is neat and readable Program style contains a few inappropriate choices (variable names, indentation, etc) Program style contains several inappropriate choices (variable names, indentation, etc) Program style is poor Documentation (4) Program is well documented, with usage information and adequate comments throughout Program contains usage information but is missing a few comments Program does not contain usage information and is missing a few comments Inadequate usage information and comments are present 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.png Your script should gracefully handle the following exceptions: · No argument provided · Input provided is not binary · Input rows are not all the same size Submission Requirements Submit your assignment under the Portfolio 3 section on blackboard Notes Your work must comply with ECU referencing guidelines and plagiarism policy 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: cat input.txt 000011101110011111 100010101110011111 000011101110011011 000010101110011111 cat input.txt | ruby workshop5.rb Input: 000011101110011111 100010101110011111 000011101110011011 000010101110011111 Output: 000010011001010000 110011111001010000 100011011001010110 000011111001010100 *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: · Non-binary input · Irregular input, eg: · 00000000 · 0001 · 000000 Note: · 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) Submission Requirements Submit your assignment under the Portfolio 3 section on blackboard Notes Your work must comply with ECU referencing guidelines and plagiarism policy
Answered Same DayMay 20, 2020CSG6206

Answer To: CSG6206 – Advanced Scripting Portfolio 3 IMPORTANT When completing portfolio 2 you may select any...

Mari answered on May 22 2020
149 Votes
Task 1: Image Creation
Write a script that will convert an array of 1’s and 0’s to a black and whit
e (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...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here