Example #1
0
        internal static JobHandle DecodeToPdnLayer(this PhotoshopFile.Layer psdLayer, JobHandle inputDeps, out BitmapLayer pdnLayer)
        {
            var psdFile = psdLayer.PsdFile;

            psdLayer.CreateMissingChannels();

            pdnLayer           = new BitmapLayer(psdFile.ColumnCount, psdFile.RowCount);
            pdnLayer.Name      = psdLayer.Name;
            pdnLayer.Opacity   = psdLayer.Opacity;
            pdnLayer.Visible   = psdLayer.Visible;
            pdnLayer.IsGroup   = psdLayer.IsGroup;
            pdnLayer.LayerID   = psdLayer.LayerID;
            pdnLayer.BlendMode = BlendModeMapping.FromPsdBlendMode(psdLayer.BlendModeKey);
            return(ImageDecoderPdn.DecodeImage(pdnLayer, psdLayer, inputDeps));
        }
Example #2
0
        internal static BitmapLayer DecodeToPdnLayer(
            this PhotoshopFile.Layer psdLayer)
        {
            var psdFile = psdLayer.PsdFile;

            psdLayer.CreateMissingChannels();

            var pdnLayer = new BitmapLayer(psdFile.ColumnCount, psdFile.RowCount);

            pdnLayer.Name    = psdLayer.Name;
            pdnLayer.Opacity = psdLayer.Opacity;
            pdnLayer.Visible = psdLayer.Visible;
            ImageDecoderPdn.DecodeImage(pdnLayer, psdLayer);

            return(pdnLayer);
        }