protected override bool ExtractCachedExternalImagePropertiesIfValid(Microsoft.ReportingServices.ReportIntermediateFormat.ImageInfo imageInfo, out byte[] imageData, out string mimeType, out string streamName)
 {
     imageData  = imageInfo.GetCachedImageData();
     streamName = imageInfo.StreamName;
     mimeType   = imageInfo.MimeType;
     return(true);
 }
        public override string AddExternalImage(string value, byte[] imageData, string mimeType)
        {
            Global.Tracer.Assert(imageData != null, "Missing imageData for external image");
            string text = ImageHelper.StoreImageDataInChunk(Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes.Image, imageData, mimeType, m_odpMetadata, m_chunkFactory);

            Microsoft.ReportingServices.ReportIntermediateFormat.ImageInfo imageInfo = new Microsoft.ReportingServices.ReportIntermediateFormat.ImageInfo(text, mimeType);
            imageInfo.SetCachedImageData(imageData);
            m_odpMetadata.AddExternalImage(value, imageInfo);
            return(text);
        }
        public override string AddExternalImage(string value, byte[] imageData, string mimeType)
        {
            Global.Tracer.Assert(imageData != null, "Missing imageData for external image");
            string text = ImageHelper.GenerateImageStreamName();

            if (!m_odpMetadata.TryGetExternalImage(value, out Microsoft.ReportingServices.ReportIntermediateFormat.ImageInfo imageInfo))
            {
                imageInfo = new Microsoft.ReportingServices.ReportIntermediateFormat.ImageInfo(text, mimeType);
                m_odpMetadata.AddExternalImage(value, imageInfo);
            }
            imageInfo.SetCachedImageData(imageData);
            return(text);
        }
        public override bool TryGetEmbeddedImage(string value, Microsoft.ReportingServices.OnDemandReportRendering.Image.EmbeddingModes embeddingMode, OnDemandProcessingContext odpContext, out byte[] imageData, out string mimeType, out string streamName)
        {
            Global.Tracer.Assert(embeddingMode == Microsoft.ReportingServices.OnDemandReportRendering.Image.EmbeddingModes.Inline, "Invalid image embedding mode");
            Microsoft.ReportingServices.ReportIntermediateFormat.ImageInfo value2 = null;
            Dictionary <string, Microsoft.ReportingServices.ReportIntermediateFormat.ImageInfo> embeddedImages = odpContext.EmbeddedImages;

            if (embeddedImages == null || !embeddedImages.TryGetValue(value, out value2))
            {
                imageData  = null;
                mimeType   = null;
                streamName = null;
                return(false);
            }
            imageData  = value2.GetCachedImageData();
            streamName = value2.StreamName;
            mimeType   = value2.MimeType;
            return(true);
        }
示例#5
0
 public void AddFailedExternalImage(string value)
 {
     Microsoft.ReportingServices.ReportIntermediateFormat.ImageInfo imageInfo = new Microsoft.ReportingServices.ReportIntermediateFormat.ImageInfo(null, null);
     imageInfo.ErrorOccurred = true;
     m_odpMetadata.AddExternalImage(value, imageInfo);
 }
示例#6
0
 protected abstract bool ExtractCachedExternalImagePropertiesIfValid(Microsoft.ReportingServices.ReportIntermediateFormat.ImageInfo imageInfo, out byte[] imageData, out string mimeType, out string streamName);