Closed NewGraphEnvironment closed 4 months ago
error_unrezised_perhaps <- magick::image_read("/Users/airvine/Library/CloudStorage/OneDrive-Personal/Projects/2023_data/skeena/photos/8801379/TimePhoto_20230926_110112_downstream.jpg")
magick::image_info(error_unrezised_perhaps)
#> format width height colorspace matte filesize density
#> 1 JPEG 1440 1080 sRGB FALSE 775888 72x72
resized1 <- magick::image_read("/Users/airvine/Library/CloudStorage/OneDrive-Personal/Projects/2023_data/skeena/photos/8801379/TimePhoto_20230926_103406_outlet.JPG")
magick::image_info(resized1)
#> format width height colorspace matte filesize density
#> 1 JPEG 1296 972 sRGB FALSE 595852 72x72
resized2 <- magick::image_read("/Users/airvine/Library/CloudStorage/OneDrive-Personal/Projects/2023_data/skeena/photos/8547/20230918_171714_8547_ds2_typical_2.JPG")
magick::image_info(resized2)
#> format width height colorspace matte filesize density
#> 1 JPEG 1296 972 sRGB FALSE 762513 72x72
error_unrezised_perhaps_al <- magick::image_read("/Users/airvine/Library/CloudStorage/OneDrive-Personal/Projects/2023_data/skeena/photos/8547/IMG_2626.JPG")
magick::image_info(error_unrezised_perhaps_al)
#> format width height colorspace matte filesize density
#> 1 JPEG 1296 972 sRGB FALSE 398940 72x72
error_unrezised_perhaps_mateo <- magick::image_read("/Users/airvine/Library/CloudStorage/OneDrive-Personal/Projects/2023_data/skeena/photos/8547/TimePhoto_20230920_110557.JPG")
magick::image_info(error_unrezised_perhaps_mateo)
#> format width height colorspace matte filesize density
#> 1 JPEG 1296 972 sRGB FALSE 671554 72x72
Created on 2024-04-04 with reprex v2.1.0
Thinking this is a one off (photo added "by hand" after resizing was done) with https://github.com/NewGraphEnvironment/fish_passage_skeena_2023_reporting/issues/13 paying off in a bit of reassurance that this is the case. Cool. Will resize and retry submission
# need to resize the photo that was not resized as per https://github.com/NewGraphEnvironment/fish_passage_skeena_2023_reporting/issues/55
error_unrezised_perhaps <- magick::image_read("/Users/airvine/Library/CloudStorage/OneDrive-Personal/Projects/2023_data/skeena/photos/8801379/TimePhoto_20230926_110112_downstream.jpg")
magick::image_info(error_unrezised_perhaps)
#> format width height colorspace matte filesize density
#> 1 JPEG 1440 1080 sRGB FALSE 775888 72x72
# resize in place
fpr::fpr_photo_resize_convert(photo = "/Users/airvine/Library/CloudStorage/OneDrive-Personal/Projects/2023_data/skeena/photos/8801379/TimePhoto_20230926_110112_downstream.jpg",
path = "/Users/airvine/Library/CloudStorage/OneDrive-Personal/Projects/2023_data/skeena/photos/8801379/")
resized_image <- magick::image_read("/Users/airvine/Library/CloudStorage/OneDrive-Personal/Projects/2023_data/skeena/photos/8801379/TimePhoto_20230926_110112_downstream.jpg")
magick::image_info(resized_image)
#> # A tibble: 1 × 7
#> format width height colorspace matte filesize density
#> <chr> <int> <int> <chr> <lgl> <int> <chr>
#> 1 JPEG 1037 778 sRGB FALSE 421259 72x72
Created on 2024-04-04 with reprex v2.1.0
copy over to pscis submission file
error_unrezised_perhaps <- magick::image_read("/Users/airvine/Library/CloudStorage/OneDrive-Personal/Projects/PSCIS/2023/skeena/phase1/8801379/TimePhoto_20230926_110112_downstream.jpg")
magick::image_info(error_unrezised_perhaps)
#> format width height colorspace matte filesize density
#> 1 JPEG 1440 1080 sRGB FALSE 775888 72x72
file.copy(from = "/Users/airvine/Library/CloudStorage/OneDrive-Personal/Projects/2023_data/skeena/photos/8801379/TimePhoto_20230926_110112_downstream.jpg",
to = "/Users/airvine/Library/CloudStorage/OneDrive-Personal/Projects/PSCIS/2023/skeena/phase1/8801379/TimePhoto_20230926_110112_downstream.jpg",
overwrite = TRUE)
#> [1] TRUE
resized_image <- magick::image_read("/Users/airvine/Library/CloudStorage/OneDrive-Personal/Projects/PSCIS/2023/skeena/phase1/8801379/TimePhoto_20230926_110112_downstream.jpg")
magick::image_info(resized_image)
#> format width height colorspace matte filesize density
#> 1 JPEG 1037 778 sRGB FALSE 421259 72x72
Created on 2024-04-04 with reprex v2.1.0
hmm same issue.
Have seen this before... Cannot remember how we got around it. B/c of documentation in https://github.com/NewGraphEnvironment/fish_passage_skeena_2023_reporting/issues/13 - guessing this may be related to some sort of manipulation of this particular photo. Will try removing and replacing with no_photo_downstream.JPG. Not ideal but hopefully will work
from https://github.com/NewGraphEnvironment/fish_passage_skeena_2023_reporting/issues/13