|
120 | 120 | # The uri provided here "thumbnail" must match an identifier in the manifest definition.
|
121 | 121 | builder.add_resource_file("thumbnail", "tests/fixtures/A_thumbnail.jpg")
|
122 | 122 |
|
123 |
| - # Or we can add the resource from a stream |
| 123 | + # Or add the resource from a stream |
124 | 124 | a_thumbnail_jpg_stream = open("tests/fixtures/A_thumbnail.jpg", "rb")
|
125 | 125 | builder.add_resource("image/jpeg", a_thumbnail_jpg_stream)
|
126 | 126 |
|
|
137 | 137 | # Add the ingredient to the builder loading information from a source file.
|
138 | 138 | builder.add_ingredient_file(ingredient_json, "tests/fixtures/A.jpg")
|
139 | 139 |
|
140 |
| - # Or we can add the ingredient from a stream |
| 140 | + # Or add the ingredient from a stream |
141 | 141 | a_jpg_stream = open("tests/fixtures/A.jpg", "rb")
|
142 | 142 | builder.add_ingredient("image/jpeg", a_jpg_stream)
|
143 | 143 |
|
|
153 | 153 | # This returns the binary manifest data that could be uploaded to cloud storage.
|
154 | 154 | c2pa_data = builder.sign_file(signer, "tests/fixtures/A.jpg", "target/out.jpg")
|
155 | 155 |
|
156 |
| - # Or we can sign the builder with a stream and output it to a stream |
| 156 | + # Or sign the builder with a stream and output it to a stream |
157 | 157 | input_stream = open("tests/fixtures/A.jpg", "rb")
|
158 | 158 | output_stream = open("target/out.jpg", "wb")
|
159 | 159 | c2pa_data = builder.sign(signer, "image/jpeg", input_stream, output_stream)
|
|
0 commit comments