spec/support/image_helpers.rb in sqed-0.0.4 vs spec/support/image_helpers.rb in sqed-0.1.0

- old
+ new

@@ -6,73 +6,101 @@ def get_image(file_name) Magick::Image.read(File.expand_path(BASE_PATH + file_name, __FILE__)).first end - # Images + def of_size(width = 1024, height = 768) + Magick::Image.new(width, height) { + self.background_color = 'white' + } + end - def test0_image - get_image('test3.jpg') + # Stage images + def standard_cross_green + get_image 'stage_images/boundary_cross_green.jpg' end - def greenline_image - get_image 'greenlineimage.jpg' + def frost_stage + get_image 'stage_images/frost_stage.jpg' end - def ocr_image - get_image 'test4.jpg' + def crossy_green_line_specimen + get_image 'stage_images/CrossyGreenLinesSpecimen.jpg' end - def barcode_image - get_image 'test_barcode.jpg' + def crossy_black_line_specimen + get_image 'stage_images/CrossyBlackLinesSpecimen.jpg' end - def labels_image - get_image 'types_8.jpg' + def black_stage_green_line_specimen + get_image 'stage_images/black_stage_green_line_specimen.jpg' end - def foo3_image - get_image 'foo3.jpg' + def offset_cross_red + get_image 'stage_images/boundary_offset_cross_red.jpg' end - # Images for boundary tests (otherwise empty) + def right_t_green + get_image 'stage_images/boundary_right_t_green.jpg' + end - def standard_cross_green - get_image 'boundary_cross_green.jpg' + def left_t_yellow + get_image 'stage_images/boundary_left_t_yellow.jpg' end - def crossy_green_line_specimen - get_image 'CrossyGreenLinesSpecimen.jpg' + def greenline_image + get_image 'stage_images/greenlineimage.jpg' end - def crossy_black_line_specimen - get_image 'CrossyBlackLinesSpecimen.jpg' + + # barcode images + + def datamatrix_barcode_image + get_image 'barcode_images/datamatrix_barcode.png' end - def black_stage_green_line_specimen - get_image 'black_stage_green_line_specimen.jpg' + def code_128_barcode_image + get_image 'barcode_images/code_128_barcode.png' end + def osuc_datamatrix_barcode_image + get_image 'barcode_images/osuc_datamatric_barcode.png' + end + + # label (text) images + + # NOT USED def black_stage_green_line_specimen_label - get_image 'label_images/black_stage_green_line_specimen_label.jpg' + get_image 'label_iamges/label_images/black_stage_green_line_specimen_label.jpg' end - def offset_cross_red - get_image 'boundary_offset_cross_red.jpg' + def readme_text + get_image 'label_images/readme.png' end - def right_t_green - get_image 'boundary_right_t_green.jpg' + def basic_text_image1 + get_image 'label_images/basic1.png' end - def left_t_yellow - get_image 'boundary_left_t_yellow.jpg' + def basic_text_image2 + get_image 'label_images/basic2.png' end - def of_size(width = 1024, height = 768) - Magick::Image.new(width, height) { - self.background_color = 'white' - } + # Real life, black border, no internal boundaries + def test3_image + get_image 'test3.jpg' end + + def foo3_image + get_image 'foo3.jpg' + end + + # misc images + + # Not used + def slide_scan_image + get_image 'misc_images/types_8.jpg' + end + end end