insights_operator_pull_only.go | |
---|---|
|
|
Link to generated documentation for this script: https://redhatinsights.github.io/insights-results-aggregator-utils/packages/insightsoperatorpull_only.html |
|
readOriginal function tries to read the GIF file that contains the static input image. Animation to be created are based on this source image. |
|
try to open the file specified by its name and check for any error |
|
file needs to be closed properly before that function ends |
|
try to close the file and check for any error that might happened |
|
try to decode GIF frames from reader |
|
we have to use image.Paletted, so it is needed to convert the image into desired format |
|
writeAnimation function stores all images into GIF file. Each image (from
|
|
try to open the file specified by its name and check for any error |
|
file needs to be closed properly before that function ends |
|
try to close the file and check for any error that might happened |
|
try to encode all GIF frames to output file |
|
check if any error occured during EncodeAll operation |
|
drawAnt function draws one "marching" ant into the frame represented by
TODO: make color palette completely configurable |
|
standard color palette with four colors |
|
initialize color palette |
|
rectangle that represents ant |
|
draw the rectangle using selected color |
|
drawMarchingAnts functions draws all "marching" ants into the frame
represented by TODO: make this part completely configurable |
|
vertical line |
|
horizontal line |
|
vertical line |
|
horizontal line |
|
special unmovable blocks |
|
main function is called by runtime after the tool has been started from command line. |
|
frames representing the whole animation stored in GIF file |
|
delays between frames |
|
only 20 frames needs to be created |
|
create all frames to generate final animation |
|
read original image TODO: make the file name configurable |
|
draw new frame based on original image |
|
and add the frame into animation |
|
write resulting animation (set of frames) into GIF file TODO: make the file name configurable |
|