- Timestamp:
- 01/16/08 16:07:40 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Carsten_PtrWork2/Source/System/Image/WS/OSGImage.cpp
r1018 r1039 681 681 ImagePtr destination) 682 682 { 683 UChar8 *data = NULL;684 const UChar8 *sourceData = NULL;685 UInt32 srcI, destI, destSize = 0;686 UInt32 sum;687 Real64 sumReal;688 Image Ptr dest = destination;683 UChar8 *data = NULL; 684 const UChar8 *sourceData = NULL; 685 UInt32 srcI, destI, destSize = 0; 686 UInt32 sum; 687 Real64 sumReal; 688 ImageRefPtr dest(destination); 689 689 690 690 if (hasCompressedData()) … … 697 697 { 698 698 dest = Image::create(); 699 addRef(dest);700 699 } 701 700 … … 2023 2022 { 2024 2023 this->set(dest); 2025 subRef(dest);2026 2024 } 2027 2025 } … … 2120 2118 getDataType(), destDataType)); 2121 2119 2122 ImagePtr dest; 2123 2124 dest = Image::create(); 2125 2126 addRef(dest); 2120 ImageRefPtr dest(Image::create()); 2127 2121 2128 2122 dest->set(getPixelFormat(), … … 2419 2413 { 2420 2414 this->set(dest); 2421 2422 subRef(dest);2423 2415 } 2424 2416 … … 2513 2505 if(att == NullFC) 2514 2506 { 2515 att = ImageGenericAtt::create(); 2516 2517 addAttachment(att); 2507 ImageGenericAttRefPtr newAtt = ImageGenericAtt::create(); 2508 att = newAtt; 2509 2510 addAttachment(newAtt); 2518 2511 } 2519 2512 … … 2712 2705 ImagePtr destination) 2713 2706 { 2714 Image Ptr destImage = destination;2715 bool retCode = true;2707 ImageRefPtr destImage(destination); 2708 bool retCode = true; 2716 2709 2717 2710 if (hasCompressedData()) … … 2724 2717 { 2725 2718 destImage = Image::create(); 2726 2727 addRef(destImage);2728 2719 } 2729 2720 … … 2783 2774 { 2784 2775 this->set(destImage); 2785 2786 subRef(destImage);2787 2776 } 2788 2777 … … 2800 2789 ImagePtr destination) 2801 2790 { 2802 Image Ptr destImage = destination;2803 bool retCode = true;2804 UInt32 counter = 0;2791 ImageRefPtr destImage(destination); 2792 bool retCode = true; 2793 UInt32 counter = 0; 2805 2794 2806 2795 if (hasCompressedData()) … … 2813 2802 { 2814 2803 destImage = Image::create(); 2815 2816 addRef(destImage);2817 2804 } 2818 2805 … … 2917 2904 { 2918 2905 this->set(destImage); 2919 2920 subRef(destImage);2921 2906 } 2922 2907 … … 2974 2959 }; 2975 2960 2976 Int32 offsetSize[] = { 0, 2, 2, 4, 2, 4, 4, 8 }; 2977 2978 ImagePtr destImage = destination; 2961 Int32 offsetSize[] = { 0, 2, 2, 4, 2, 4, 4, 8 }; 2962 ImageRefPtr destImage(destination); 2979 2963 2980 2964 Int32 w = getWidth(), h = getHeight(), d = getDepth(); … … 3001 2985 { 3002 2986 destImage = Image::create(); 3003 3004 addRef(destImage);3005 2987 } 3006 2988 … … 3394 3376 { 3395 3377 this->set(destImage); 3396 3397 subRef(destImage);3398 3378 } 3399 3379
