public Bitmap GetImage(ObjectDataSegment ods, bool AddBorder = false)
        {
            if (SubtitleSegments == null)
            {
                ParseSegments();
            }

            // this caches the image, removing so border switching works, do I need to clean up memory?
            if (ods.Image != null)
            {
                //return ods.Image;
                ods.Image.Dispose();
            }

            var cds = GetClutDefinitionSegment(ods);

            ods.DecodeImage(_dataBuffer, ods.BufferIndex, cds);

            if (AddBorder)
            {
                return(AddBitmapBorder(ods.Image, Color.White));
            }
            else
            {
                return(ods.Image);
            }
        }
Ejemplo n.º 2
0
        public Bitmap GetImage(ObjectDataSegment ods)
        {
            if (SubtitleSegments == null)
            {
                ParseSegments();
            }

            if (ods.Image != null)
            {
                return(ods.Image);
            }

            var cds = GetClutDefinitionSegment(ods);

            ods.DecodeImage(_dataBuffer, ods.BufferIndex, cds);
            return(ods.Image);
        }