Exemplo n.º 1
0
        public bool SplitFromImage32(string sFile, int iCellWidth, int iCellHeight, int iRows, int iColumns, IPoint ipAsCellSpacing, IZone izoneAsMargins)
        {
            GBuffer gbTemp;
            bool    bGood = false;

            try {
                gbTemp = new GBuffer(sFile);
                if (gbTemp.iPixelsTotal == 0)
                {
                    RReporting.ShowErr("Couldn't load image", "SplitFromImage32", "loading font table");
                    bGood = false;
                }
                else
                {
                    //bmpLoaded=gbTemp.bmpLoaded;//SplitFromImage32 remakes bmpLoaded
                    bGood = SplitFromImage32(ref gbTemp, iCellWidth, iCellHeight, iRows, iColumns, ipAsCellSpacing, izoneAsMargins);
                    //sLogLine="Saving test bitmap for debug...";
                    gbTemp.Save(Manager.sDataFolderSlash + "00.test bitmap for SplitFromImage32 debug.png", ImageFormat.Png);
                    //gbTemp.SaveRaw("1.test bitmap for debug.raw");
                    //sLogLine="Done saving test Bitmap for debug";
                }
            }
            catch (Exception exn) {
                RReporting.ShowExn(exn, "SplitFromImage32");
                bGood = false;
            }
            return(bGood);
        }        //end SplitFromImage32