commit 28b6cb526bf9c3e11c3c79e8af98d40f24dbc64d
parent 8144c79243c0babe70225d45b1845437b8a46bb8
Author: Gavin Peacock <gpeacock@adobe.com>
Date: Tue, 2 May 2023 15:58:10 -0700
Revert "backed out calls to set_memory_thumbnail"
This reverts commit 8144c79243c0babe70225d45b1845437b8a46bb8.
Diffstat:
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/sdk/src/ingredient.rs b/sdk/src/ingredient.rs
@@ -483,7 +483,7 @@ impl Ingredient {
{
let (format, image) =
Self::thumbnail_from_assertion(claim_assertion.assertion());
- self.set_thumbnail(format, image)?;
+ self.set_memory_thumbnail(format, image)?;
}
}
self.active_manifest = Some(claim.label().to_string());
@@ -623,7 +623,7 @@ impl Ingredient {
// create a thumbnail if we don't already have a manifest with a thumb we can use
if ingredient.thumbnail.is_none() {
if let Some((format, image)) = options.thumbnail(path) {
- ingredient.set_thumbnail(format, image)?;
+ ingredient.set_memory_thumbnail(format, image)?;
}
}
@@ -1023,13 +1023,6 @@ pub struct DefaultOptions {
#[cfg(feature = "file_io")]
impl IngredientOptions for DefaultOptions {
- fn thumbnail(&self, _path: &Path) -> Option<(String, Vec<u8>)> {
- #[cfg(feature = "add_thumbnails")]
- return crate::utils::thumbnail::make_thumbnail(_path).ok();
- #[cfg(not(feature = "add_thumbnails"))]
- None
- }
-
fn base_path(&self) -> Option<&Path> {
self.base.as_deref()
}
@@ -1371,7 +1364,7 @@ mod tests_file_io {
#[test]
#[cfg(feature = "file_io")]
fn test_jpg_with_path() {
- let ap = fixture_path("CA.jpg");
+ let ap = fixture_path("CIE-sig-CA.jpg");
let mut folder = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"));
folder.push("../target/tmp/ingredient");
let mut ingredient = Ingredient::from_file_with_folder(ap, folder).expect("from_file");