test(segmentation): add unit tests for _write_image_task JPEG and PNG output in segmentar_peixes_auto.py
This issue aims to improve code modularity and test coverage for the `_write_image_task` function in `segmentar_peixes_auto.py`. The goal is to add unit tests that verify the correct writing of JPEG crops and binary PNG masks to disk, ensuring the process passes all pytest checks without requiring GPU dependencies.