getStreamImageProperty() public method

public getStreamImageProperty ( int propertyId ) : string
propertyId int
return string
Ejemplo n.º 1
0
        public override IRow Process(IRow input, IUpdatableRow output)
        {
            var img = input.Get <byte[]>("image_data");

            // load image only once into memory per row
            using (StreamImage inImage = new StreamImage(img))
            {
                output.SetColumnIfExists("equipment_make", inImage.getStreamImageProperty(ImageProperties.equipment_make));
                output.SetColumnIfExists("equipment_model", inImage.getStreamImageProperty(ImageProperties.equipment_model));
                output.SetColumnIfExists("description", inImage.getStreamImageProperty(ImageProperties.description));
                output.SetColumnIfExists("copyright", inImage.getStreamImageProperty(ImageProperties.copyright));
                output.SetColumnIfExists("thumbnail", inImage.scaleStreamImageTo(150, 150));
            }
            return(output.AsReadOnly());
        }
Ejemplo n.º 2
0
        public override IRow Process(IRow input, IUpdatableRow output)
        {
            var img = input.Get<byte[]>("image_data");

                // load image only once into memory per row
                using (StreamImage inImage = new StreamImage(img))
                {
                    output.SetColumnIfExists("equipment_make", inImage.getStreamImageProperty(ImageProperties.equipment_make));
                    output.SetColumnIfExists("equipment_model", inImage.getStreamImageProperty(ImageProperties.equipment_model));
                    output.SetColumnIfExists("description", inImage.getStreamImageProperty(ImageProperties.description));
                    output.SetColumnIfExists("copyright", inImage.getStreamImageProperty(ImageProperties.copyright));
                    output.SetColumnIfExists("thumbnail", inImage.scaleStreamImageTo(150, 150));
                }
                return output.AsReadOnly();
        }
Ejemplo n.º 3
0
        public override IEnumerable <IRow> Extract(IUnstructuredReader input, IUpdatableRow output)
        {
            byte[] img = ImageOps.GetByteArrayforImage(input.BaseStream);

            // load image only once into memory per row
            using (StreamImage inImage = new StreamImage(img))
            {
                output.SetColumnIfExists("image", img);
                output.SetColumnIfExists("equipment_make", inImage.getStreamImageProperty(ImageProperties.equipment_make));
                output.SetColumnIfExists("equipment_model", inImage.getStreamImageProperty(ImageProperties.equipment_model));
                output.SetColumnIfExists("description", inImage.getStreamImageProperty(ImageProperties.description));
                output.SetColumnIfExists("copyright", inImage.getStreamImageProperty(ImageProperties.copyright));
                output.SetColumnIfExists("thumbnail", inImage.scaleStreamImageTo(this._scaleWidth, this._scaleHeight));
            }
            yield return(output.AsReadOnly());
        }