Tfs Embeded Images Tool #2808
Replies: 1 comment
-
|
Hi, "CommonTools": {
"TfsEmbededImagesTool": {
"Enabled": true
},
"TfsAttachmentTool": {
"Enabled": true,
"ExportBasePath": "c:\\temp\\migrationtest\\tb",
"MaxAttachmentSize": 480000000,
"RefName": "TfsAttachmentTool"
},I have a small work item with an image in the description of the work item. Is the expected behavior that when migrating, the image should be visible in Target? Because - that is not happening in my setup... EDIT: protected static ImageFormat GetImageFormat(byte[] bytes)in In particular - coverage for jpeg files is not complete. At minimum we should add: var jpeg6 = new byte[] { 255, 216, 255, 239 }; // Adobe JPEG
var jpeg7 = new byte[] { 255, 216, 255, 227 }; // JPEG with ICC profile
var jpeg8 = new byte[] { 255, 216, 255, 219 }; // JPEG with quantization table
var jpeg9 = new byte[] { 255, 216, 255, 238 }; // JPEG with Photoshop metadataThen we should extend the detection logic: if (jpeg.SequenceEqual(bytes.Take(jpeg.Length)) ||
jpeg2.SequenceEqual(bytes.Take(jpeg2.Length)) ||
jpeg3.SequenceEqual(bytes.Take(jpeg3.Length)) ||
jpeg4.SequenceEqual(bytes.Take(jpeg4.Length)) ||
jpeg5.SequenceEqual(bytes.Take(jpeg5.Length)) ||
jpeg6.SequenceEqual(bytes.Take(jpeg6.Length)) ||
jpeg7.SequenceEqual(bytes.Take(jpeg7.Length)) ||
jpeg8.SequenceEqual(bytes.Take(jpeg8.Length)) ||
jpeg9.SequenceEqual(bytes.Take(jpeg9.Length)))
return ImageFormat.jpeg;Alternatively the less strict we should just check the first two bytes of the file: if (bytes.Length >= 2 && bytes[0] == 255 && bytes[1] == 216)
return ImageFormat.jpeg;All JPEG files start with the Start of Image (SOI) marker: FF D8. I'll see if i figure out how to contribute this change... / Johan |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This discussion is for questions, feedback, and community support related to the TFS Embedded Images Tool.
Quick Reference
TfsEmbededImagesToolHow to Use This Discussion
Related Documentation
Please refer to the official documentation for detailed configuration options and examples.
Beta Was this translation helpful? Give feedback.
All reactions