protected static IPresentationImage GetImage(ImageKey key) { string filename = string.Format(_testImagePathFormat, key.ToString().ToLower()); try { LocalSopDataSource dataSource = new LocalSopDataSource(filename); ImageSop imageSop = new ImageSop(dataSource); IPresentationImage theOne = null; foreach (IPresentationImage image in PresentationImageFactory.Create(imageSop)) { if (theOne == null) { theOne = image; continue; } image.Dispose(); } imageSop.Dispose(); return(theOne); } catch (Exception ex) { throw new FileNotFoundException("Unable to load requested test image. Please check that the assembly has been built.", filename, ex); } }
public RedisImageArray GetByteArrayData(ImageKey key) => GetByteArrayData(key.ToString());
public byte[] GetByteData(ImageKey key) => GetByteData(key.ToString());