`
wgcode
  • 浏览: 600487 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

日本人写的BMPDecoder

阅读更多
/**
 * com.voidelement.images.BMPDecoder  Class for ActionScript 3.0 
 *  
 * @author       Copyright (c) 2007 munegon
 * @version      1.0
 *  
 * @link         http://www.voidelement.com/
 * @link         http://void.heteml.jp/blog/
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 *  
 * http://www.apache.org/licenses/LICENSE-2.0 
 *  
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,  
 * either express or implied. See the License for the specific language 
 * governing permissions and limitations under the License. 
 */



package com.voidelement.images {
	import flash.display.BitmapData;
	import flash.errors.IOError;
	import flash.utils.ByteArray;
	import flash.utils.Endian;
	
	public class BMPDecoder {
		//___________________________________________________________ const
		
		private const BITMAP_HEADER_TYPE:String = "BM";
		
		private const BITMAP_FILE_HEADER_SIZE:int = 14;
		private const BITMAP_CORE_HEADER_SIZE:int = 12;
		private const BITMAP_INFO_HEADER_SIZE:int = 40;
		
		private const COMP_RGB      :int = 0;
		private const COMP_RLE8     :int = 1;
		private const COMP_RLE4     :int = 2;
		private const COMP_BITFIELDS:int = 3;
		
		private const BIT1 :int = 1;
		private const BIT4 :int = 4;
		private const BIT8 :int = 8;
		private const BIT16:int = 16;
		private const BIT24:int = 24;
		private const BIT32:int = 32;
		
		
		//___________________________________________________________ vars
		
		private var bytes:ByteArray;
		private var palette:Array;
		private var bd:BitmapData;
	
		private var nFileSize:uint;
		private var nReserved1:uint;
		private var nReserved2:uint;
		private var nOffbits:uint;
		
		private var nInfoSize:uint;
		private var nWidth:int;
		private var nHeight:int;
		private var nPlains:uint;
		private var nBitsPerPixel:uint;
		private var nCompression:uint;
		private var nSizeImage:uint;
		private var nXPixPerMeter:int;
		private var nYPixPerMeter:int;
		private var nColorUsed:uint;
		private var nColorImportant:uint;
		
		private var nRMask:uint;
		private var nGMask:uint;
		private var nBMask:uint;
		private var nRPos:uint;
		private var nGPos:uint;
		private var nBPos:uint;
		private var nRMax:uint;
		private var nGMax:uint;
		private var nBMax:uint;
		
		
		/**
		 * コンストラクタ
		 */
		public function BMPDecoder() {
			nRPos = 0;
			nGPos = 0;
			nBPos = 0;
		}
		
		
		/**
		 * デコード
		 * 
		 * @param デコードしたいBMPファイルのバイナリデータ
		 */
		public function decode( data:ByteArray ):BitmapData {
			bytes = data;
			bytes.endian = Endian.LITTLE_ENDIAN;
			bytes.position = 0;
			
			readFileHeader();
			
			nInfoSize = bytes.readUnsignedInt();
			
			switch ( nInfoSize ) {
				case BITMAP_CORE_HEADER_SIZE:
					readCoreHeader();
					break;
				case BITMAP_INFO_HEADER_SIZE:
					readInfoHeader();
					break;
				default:
					readExtendedInfoHeader();
					break;
			}
			
			bd = new BitmapData( nWidth, nHeight );
			
			switch ( nBitsPerPixel ){
				case BIT1:
					readColorPalette();
					decode1BitBMP();
					break;
				case BIT4:
					readColorPalette();
					if ( nCompression == COMP_RLE4 ){
						decode4bitRLE();
					} else {
						decode4BitBMP();
					}
					break;
				case BIT8:
					readColorPalette();
					if ( nCompression == COMP_RLE8 ){
						decode8BitRLE();
					} else {
						decode8BitBMP();
					}
					break;
				case BIT16:
					readBitFields();
					checkColorMask();
					decode16BitBMP();
					break;
				case BIT24:
					decode24BitBMP();
					break;
				case BIT32:
					readBitFields();
					checkColorMask();
					decode32BitBMP();
					break;
				default:
					throw new VerifyError("invalid bits per pixel : " + nBitsPerPixel );
			}
			
			return bd;
		}
		
		
		/**
		 * BITMAP FILE HEADER 読み込み
		 */
		private function readFileHeader():void {
			var fileHeader:ByteArray = new ByteArray();
			fileHeader.endian = Endian.LITTLE_ENDIAN;
			
			try {
				bytes.readBytes( fileHeader, 0, BITMAP_FILE_HEADER_SIZE );
				
				if ( fileHeader.readUTFBytes( 2 ) != BITMAP_HEADER_TYPE ){
					throw new VerifyError("invalid bitmap header type");
				}
				
				nFileSize  = fileHeader.readUnsignedInt();
				nReserved1 = fileHeader.readUnsignedShort();
				nReserved2 = fileHeader.readUnsignedShort();
				nOffbits   = fileHeader.readUnsignedInt();
			} catch ( e:IOError ) {
				throw new VerifyError("invalid file header");
			}
		}
		
		
		/**
		 * BITMAP CORE HEADER 読み込み 
		 */
		private function readCoreHeader():void {
			var coreHeader:ByteArray = new ByteArray();
			coreHeader.endian = Endian.LITTLE_ENDIAN;
			
			try {
				bytes.readBytes( coreHeader, 0, BITMAP_CORE_HEADER_SIZE - 4 );
				
				nWidth  = coreHeader.readShort();
				nHeight = coreHeader.readShort();
				nPlains = coreHeader.readUnsignedShort();
				nBitsPerPixel = coreHeader.readUnsignedShort();
			} catch ( e:IOError ) {
				throw new VerifyError("invalid core header");
			}
		}
		
		
		/**
		 * BITMAP INFO HEADER 読み込み
		 */
		private function readInfoHeader():void {
			var infoHeader:ByteArray = new ByteArray();
			infoHeader.endian = Endian.LITTLE_ENDIAN;
			
			try {
				bytes.readBytes( infoHeader, 0, BITMAP_INFO_HEADER_SIZE - 4 );
				
				nWidth  = infoHeader.readInt();
				nHeight = infoHeader.readInt();
				nPlains = infoHeader.readUnsignedShort();
				nBitsPerPixel = infoHeader.readUnsignedShort();
				
				nCompression = infoHeader.readUnsignedInt();
				nSizeImage = infoHeader.readUnsignedInt();
				nXPixPerMeter = infoHeader.readInt();
				nYPixPerMeter = infoHeader.readInt();
				nColorUsed = infoHeader.readUnsignedInt();
				nColorImportant = infoHeader.readUnsignedInt();
			} catch ( e:IOError ) {
				throw new VerifyError("invalid info header");
			}
		}
		
		/**
		 * 拡張 BITMAP INFO HEADER 読み込み
		 */
		private function readExtendedInfoHeader():void {
			var infoHeader:ByteArray = new ByteArray();
			infoHeader.endian = Endian.LITTLE_ENDIAN;
			
			try {
				bytes.readBytes( infoHeader, 0, nInfoSize - 4 );
				
				nWidth  = infoHeader.readInt();
				nHeight = infoHeader.readInt();
				nPlains = infoHeader.readUnsignedShort();
				nBitsPerPixel = infoHeader.readUnsignedShort();
				
				nCompression = infoHeader.readUnsignedInt();
				nSizeImage = infoHeader.readUnsignedInt();
				nXPixPerMeter = infoHeader.readInt();
				nYPixPerMeter = infoHeader.readInt();
				nColorUsed = infoHeader.readUnsignedInt();
				nColorImportant = infoHeader.readUnsignedInt();
				
				if ( infoHeader.bytesAvailable >= 4 ) nRMask = infoHeader.readUnsignedInt();
				if ( infoHeader.bytesAvailable >= 4 ) nGMask = infoHeader.readUnsignedInt();
				if ( infoHeader.bytesAvailable >= 4 ) nBMask = infoHeader.readUnsignedInt();
			} catch ( e:IOError ) {
				throw new VerifyError("invalid info header");
			}
		}
		
		
		/**
		 * ビットフィールド読み込み
		 */
		private function readBitFields():void {
			if ( nCompression == COMP_RGB ){
				if ( nBitsPerPixel == BIT16 ){
					// RGB555
					nRMask = 0x00007c00;
					nGMask = 0x000003e0;
					nBMask = 0x0000001f;
				} else {
					//RGB888;
					nRMask = 0x00ff0000;
					nGMask = 0x0000ff00;
					nBMask = 0x000000ff;
				}
			} else if ( ( nCompression == COMP_BITFIELDS ) && ( nInfoSize < 52 ) ){
				try {
					nRMask = bytes.readUnsignedInt();
					nGMask = bytes.readUnsignedInt();
					nBMask = bytes.readUnsignedInt();
				} catch ( e:IOError ) {
					throw new VerifyError("invalid bit fields");
				}
			}
		}
		
		
		/**
		 * カラーパレット読み込み
		 */
		private function readColorPalette():void {
			var i:int;
			var len:int = ( nColorUsed > 0 ) ? nColorUsed : Math.pow( 2, nBitsPerPixel );
			palette = new Array( len );
			
			for ( i = 0; i < len; ++i ){
				palette[ i ] = bytes.readUnsignedInt();
			}
		}
		
		
		/**
		 * 1bitのBMPデコード
		 */
		private function decode1BitBMP():void {
			var x:int;
			var y:int;
			var i:int;
			var col:int;
			var buf:ByteArray = new ByteArray();
			var line:int = nWidth / 8;
			
			if ( line % 4 > 0 ){
				line = ( ( line / 4 | 0 ) + 1 ) * 4;
			}
			
			try {
				for ( y = nHeight - 1; y >= 0; --y ){
					buf.length = 0;
					bytes.readBytes( buf, 0, line );
					
					for ( x = 0; x < nWidth; x += 8 ){
						col = buf.readUnsignedByte();
						
						for ( i = 0; i < 8; ++i ){
							bd.setPixel( x + i, y, palette[ col >> ( 7 - i ) & 0x01 ] );
						}
					}
				}
			} catch ( e:IOError ) {
				throw new VerifyError("invalid image data");
			}
		}
		
		
		/**
		 * 4bitのRLE圧縮BMPデコード
		 */
		private function decode4bitRLE():void {
			var x:int;
			var y:int;
			var i:int;
			var n:int;
			var col:int;
			var data:uint;
			var buf:ByteArray = new ByteArray();
			
			try {
				for ( y = nHeight - 1; y >= 0; --y ){
					buf.length = 0;
					
					while ( bytes.bytesAvailable > 0 ){
						n = bytes.readUnsignedByte();
						
						if ( n > 0 ){
							// エンコードデータ
							data = bytes.readUnsignedByte();
							for ( i = 0; i < n/2; ++i ){
								buf.writeByte( data );
							}
						} else {
							n = bytes.readUnsignedByte();
							
							if ( n > 0 ){
								// 絶対モードデータ
								bytes.readBytes( buf, buf.length, n/2 );
								buf.position += n/2;
								
								if ( n/2 + 1 >> 1 << 1 != n/2 ){
									bytes.readUnsignedByte();
								}
							} else {
								// EOL
								break;
							}
						}
					}
					
					buf.position = 0;
					
					for ( x = 0; x < nWidth; x += 2 ){
						col = buf.readUnsignedByte();
						
						bd.setPixel( x, y, palette[ col >> 4 ] );
						bd.setPixel( x + 1, y, palette[ col & 0x0f ] );
					}
				}
			} catch ( e:IOError ) {
				throw new VerifyError("invalid image data");
			}
		}
		
		
		/**
		 * 4bitの非圧縮BMPデコード
		 */
		private function decode4BitBMP():void {
			var x:int;
			var y:int;
			var i:int;
			var col:int;
			var buf:ByteArray = new ByteArray();
			var line:int = nWidth / 2;
			
			if ( line % 4 > 0 ){
				line = ( ( line / 4 | 0 ) + 1 ) * 4;
			}
			
			try {
				for ( y = nHeight - 1; y >= 0; --y ){
					buf.length = 0;
					bytes.readBytes( buf, 0, line );
					
					for ( x = 0; x < nWidth; x += 2 ){
						col = buf.readUnsignedByte();
						
						bd.setPixel( x, y, palette[ col >> 4 ] );
						bd.setPixel( x + 1, y, palette[ col & 0x0f ] );
					}
				}
			} catch ( e:IOError ) {
				throw new VerifyError("invalid image data");
			}
		}
		
		
		/**
		 * 8bitのRLE圧縮BMPデコード
		 */
		private function decode8BitRLE():void {
			var x:int;
			var y:int;
			var i:int;
			var n:int;
			var col:int;
			var data:uint;
			var buf:ByteArray = new ByteArray();
			
			try {
				for ( y = nHeight - 1; y >= 0; --y ){
					buf.length = 0;
					
					while ( bytes.bytesAvailable > 0 ){
						n = bytes.readUnsignedByte();
						
						if ( n > 0 ){
							// エンコードデータ
							data = bytes.readUnsignedByte();
							for ( i = 0; i < n; ++i ){
								buf.writeByte( data );
							}
						} else {
							n = bytes.readUnsignedByte();
							
							if ( n > 0 ){
								// 絶対モードデータ
								bytes.readBytes( buf, buf.length, n );
								buf.position += n;
								if ( n + 1 >> 1 << 1 != n ){
									bytes.readUnsignedByte();
								}
							} else {
								// EOL
								break;
							}
						}
					}
					
					buf.position = 0;
					
					for ( x = 0; x < nWidth; ++x ){
						bd.setPixel( x, y, palette[ buf.readUnsignedByte() ] );
					}
				}
			} catch ( e:IOError ) {
				throw new VerifyError("invalid image data");
			}
		}
		
		/**
		 * 8bitの非圧縮BMPデコード
		 */
		private function decode8BitBMP():void {
			var x:int;
			var y:int;
			var i:int;
			var col:int;
			var buf:ByteArray = new ByteArray();
			var line:int = nWidth;
			
			if ( line % 4 > 0 ){
				line = ( ( line / 4 | 0 ) + 1 ) * 4;
			}
			
			try {
				for ( y = nHeight - 1; y >= 0; --y ){
					buf.length = 0;
					bytes.readBytes( buf, 0, line );
					
					for ( x = 0; x < nWidth; ++x ){
						bd.setPixel( x, y, palette[ buf.readUnsignedByte() ] );
					}
				}
			} catch ( e:IOError ) {
				throw new VerifyError("invalid image data");
			}
		}
		
		/**
		 * 16bitのBMPデコード
		 */
		private function decode16BitBMP():void {
			var x:int;
			var y:int;
			var col:int;
			
			try {
				for ( y = nHeight - 1; y >= 0; --y ){
					for ( x = 0; x < nWidth; ++x ){
						col = bytes.readUnsignedShort();
						bd.setPixel( x, y, ( ( ( col & nRMask ) >> nRPos )*0xff/nRMax << 16 ) + ( ( ( col & nGMask ) >> nGPos )*0xff/nGMax << 8 ) + ( ( ( col & nBMask ) >> nBPos )*0xff/nBMax << 0 ) );
					}
				}
			} catch ( e:IOError ) {
				throw new VerifyError("invalid image data");
			}
		}
		
		/**
		 * 24bitのBMPデコード
		 */
		private function decode24BitBMP():void {
			var x:int;
			var y:int;
			var col:int;
			var buf:ByteArray = new ByteArray();
			var line:int = nWidth * 3;
			
			if ( line % 4 > 0 ){
				line = ( ( line / 4 | 0 ) + 1 ) * 4;
			}
			
			try {
				for ( y = nHeight - 1; y >= 0; --y ){
					buf.length = 0;
					bytes.readBytes( buf, 0, line );
					
					for ( x = 0; x < nWidth; ++x ){
						bd.setPixel( x, y, buf.readUnsignedByte() + ( buf.readUnsignedByte() << 8 ) + ( buf.readUnsignedByte() << 16 ) );
					}
				}
			} catch ( e:IOError ) {
				throw new VerifyError("invalid image data");
			}
		}
		
		/**
		 * 32bitのBMPデコード
		 */
		private function decode32BitBMP():void {
			var x:int;
			var y:int;
			var col:int;
			
			try {
				for ( y = nHeight - 1; y >= 0; --y ){
					for ( x = 0; x < nWidth; ++x ){
						col = bytes.readUnsignedInt();
						bd.setPixel( x, y, ( ( ( col & nRMask ) >> nRPos )*0xff/nRMax << 16 ) + ( ( ( col & nGMask ) >> nGPos )*0xff/nGMax << 8 ) + ( ( ( col & nBMask ) >> nBPos )*0xff/nBMax << 0 ) );
					}
				}
			} catch ( e:IOError ) {
				throw new VerifyError("invalid image data");
			}
		}
		
		
		/**
		 * カラーマスクチェック
		 */
		private function checkColorMask():void {
			if ( ( nRMask & nGMask ) | ( nGMask & nBMask ) | ( nBMask & nRMask ) ){
				throw new VerifyError("invalid bit fields");
			}
			
			while ( ( nRMask >> nRPos ) & 0x00000001 == 0 ){
				nRPos++;
			}
			while ( ( nGMask >> nGPos ) & 0x00000001 == 0 ){
				nGPos++;
			}
			while ( ( nBMask >> nBPos ) & 0x00000001 == 0 ){
				nBPos++;
			}
			
			nRMax = nRMask >> nRPos;
			nGMax = nGMask >> nGPos;
			nBMax = nBMask >> nBPos;
		}
		
		
		/**
		 * 情報出力
		 */
		public function traceInfo():void {
			trace("---- FILE HEADER ----");
			trace("nFileSize: " + nFileSize );
			trace("nReserved1: " + nReserved1 );
			trace("nReserved2: " + nReserved2 );
			trace("nOffbits: " + nOffbits );
			
			trace("---- INFO HEADER ----");
			trace("nWidth: " + nWidth );
			trace("nHeight: " + nHeight );
			trace("nPlains: " + nPlains );
			trace("nBitsPerPixel: " + nBitsPerPixel );
			
			if ( nInfoSize >= 40 ){
				trace("nCompression: " + nCompression );
				trace("nSizeImage: " + nSizeImage );
				trace("nXPixPerMeter: " + nXPixPerMeter );
				trace("nYPixPerMeter: " + nYPixPerMeter );
				trace("nColorUsed: " + nColorUsed );
				trace("nColorUsed: " + nColorImportant );
			}
			
			if ( nInfoSize >= 52 ){
				trace("nRMask: " + nRMask.toString( 2 ) );
				trace("nGMask: " + nGMask.toString( 2 ) );
				trace("nBMask: " + nBMask.toString( 2 ) );
			}
		}
	}
}

 

分享到:
评论

相关推荐

    BMPDecoder.rar

    标题"BMPDecoder.rar"指的是一个专门用于处理BMP图像文件的解码类,适用于ActionScript 3.0(AS3)编程环境。BMP(Bitmap)是一种常见的位图格式,广泛用于存储数字图像。在AS3中,处理这种格式的图像通常涉及到二...

    显示BMP的AS3支持类库

    1. **BMPDecoder.as**: 这个文件很可能是实现BMP文件解析的核心类。在AS3中,开发者通常会创建一个类来处理BMP文件的二进制数据,将其转化为可以显示的Bitmap对象。BMPDecoder可能包含读取BMP文件头信息、解析像素...

    Micropython ST7735驱动

    **正文** 在嵌入式开发领域,MicroPython是一种精简版的Python编程语言,它被设计用于资源有限的微控制器,如Arduino或Raspberry Pi Pico等。ST7735是一款广泛应用于小型TFT LCD显示屏的驱动芯片,主要用于显示图形...

    电子相册 开发板

    - **BmpDecoder.h**:头文件,包含了BmpDecoder.c中的函数声明和其他必要的定义。 - **BmpInfoHeader.h**:定义了位图信息头结构体,这是理解位图文件格式的基础。 - **BmpPalette.h**:定义了位图调色板相关的...

    电力日负荷曲线预测程序和数据集(预测未来一天的负荷曲线)

    电力日负荷曲线预测程序和数据集(预测未来一天的负荷曲线)

    勾正科技向新而生智赢未来-2024年H1中国家庭智能大屏行业发展白皮书83页.pdf

    勾正科技向新而生智赢未来-2024年H1中国家庭智能大屏行业发展白皮书83页.pdf

    成绩分析问题-总文件压缩包(代码+所有磁盘文件)

    题目2.2(成绩分析问题):设计并实现一个成绩分析系统,们能够实现录入、保存一个班级学生多门课程的成绩,并成绩进行分析等功能。

    源代码-非零坊ASP友情链接 v5.0.zip

    更多毕业设计https://cv2022.blog.csdn.net/article/details/124463185

    java-springboot+vue应急救援物资管理系统源码.zip

    系统选用B/S模式,后端应用springboot框架,前端应用vue框架, MySQL为后台数据库。 本系统基于java设计的各项功能,数据库服务器端采用了Mysql作为后台数据库,使Web与数据库紧密联系起来。 在设计过程中,充分保证了系统代码的良好可读性、实用性、易扩展性、通用性、便于后期维护、操作方便以及页面简洁等特点。

    鸿蒙应用开发领域中DevEco Studio的安装、使用技巧及性能分析工具详细介绍

    内容概要:本文主要介绍了鸿蒙原生应用开发过程中可能遇到的内存问题以及相应的解决方案。针对这些问题,华为提供的 DevEco Studio 包含了性能分析工具 DevEco Profiler,提供两种场景化的分析模板——Snapshot Insight 和 Allocation Insight,支持实时监控、ArkTS 和 Native 内存的深度分析。这使得开发者能够有效识别、定界定位并优化内存问题,大幅提升应用的稳定性和性能。此外,文章还介绍了 DevEco Studio 强大的模拟器功能,该模拟器能仿真各类设备及场景,包括GPS定位、导航和低电量管理,极大提高了开发效率和测试灵活性。最后,文中详细列出了常见的快捷键,并给出了保持 DevEco Studio 与 Android Studio 快捷键同步的方法。 适合人群:专注于鸿蒙生态系统内的应用开发的技术人员,特别是有一定经验的中级至高级程序员。 使用场景及目标:本文旨在帮助开发者更好地理解和掌握 DevEco Studio 的强大工具链,尤其是解决开发过程中经常遇见的内存管理和多设备兼容问题,目标是优化开发流程,减少调测时间,增强产品的质量和用户体验。 阅读建议:开发者可通过鸿蒙官方提供的资源链接下载最新版本的 DevEco Studio 并探索相关技术博客,以获得最新的技术和使用技巧。建议在实践中逐步熟悉各个功能模块,并积极利用性能分析工具和模拟器来解决现实中的问题。

    我是谁啊我耽误 的耽误是

    我是谁

    精美导航引导页HTML源码 自适应手机/电脑,无后台

    精美导航引导页HTML源码,自适应手机/电脑,无后台,上传网站根目录就能用,首页内容在index里面修改 可以双页切换,亲测可用,搭建简单,附带修改教程

    hap手机软件包测试用

    hap手机软件包测试,测试使用

    电气工程领域的Altium Designer电子线路CAD训练-从基础入门到PCB设计实践

    内容概要:本文档是一份针对自动化专业的《电子线路CAD训练》实习报告,详细介绍了通过使用Altium Designer冬春软件进行电子线路的原理图设计、元件库文件设计、PCB板设计及元件封装库设计的过程。文档首先概述了训练的目的和重要性,随后逐步讲解Altium Designer Winter的安装与配置,然后重点展示了具体元件的设计细节,如温度传感器、AD输入通道、四双向模拟开关等的实际应用。此外,还详细阐述了自动布线和手动布线的具体步骤与注意事项,最后通过对此次实习的回顾,强调了本次训练对于提升电路设计能力和后续学习的支持。 适用人群:本报告适用于正在学习自动化及相关专业的在校大学生或从事电气工程领域的工程师和技术人员。 使用场景及目标:旨在帮助读者深入了解电子线路CAD的基础理论知识及其实际应用场景,特别是在Altium Designer环境下的操作流程。目标在于强化学生或技术人员的专业技能,以便他们能够在未来的工作或研究中有更强的设计能力。同时,该报告也可作为相关课程的教学材料。 其他说明:附录部分提供了完整的电路原理图和详细的元器件列表,供读者进一步理解和参照练习。

    2019年 金融网点分县统计数据.zip

    “2019年金融网点分县统计数据”提供了中国县域金融机构布局的详细信息,覆盖国有大型商业银行、股份制商业银行、城市商业银行及农村商业银行的网点分布特征。截至2019年底,全国银行网点总量为197,719个,其中县域地区分布87,003个,占比44%;市区网点110,716个,占比56%。 从银行类型看,国有大型商业银行县域网点数量最多(46,481个),但分布不均,如交通银行县域网点仅占9.01%,而邮政储蓄银行县域覆盖率高达59%。股份制商业银行县域网点仅占10%,主要集中于华东地区(73%)。农村商业银行县域网点占比60%(34,525个),华北和华中地区占其总量的53%。 区域分布上,华中地区县域网点占比最高(57.66%),其次是华东(34%)和西南(46%);华南地区县域网点最少,仅占7%。国有大行在华东地区县域网点占比32%,农村商业银行则集中在华北(32%)和华中(21%)。 该数据为研究金融资源城乡配置、普惠金融发展及区域经济差异提供了基础支撑。例如,国有大行2019年县域网点数量较前一年增加,反映其下沉服务趋势;而农村金融机构通过人缘地缘优势持续优化县域服务。数据格式包含分银行、分地区的统计表格,适用于量化分析金融网络覆盖与经济社会发展的关联性。

    GFP-ATOMIC参数的含义

    GFP-ATOMIC参数的含义

    ollama国内源,bash使用

    ollama国内源,bash使用

    电动汽车制造商迁移至Snowflake的数据平台现代化解决方案与实操

    内容概要:本文详细介绍了一家电动汽车(EV)制造商面临的数据处理挑战以及为解决这些问题所采取的举措——将现有数据平台迁移到Snowflake云平台上。文中阐述了制造商目前遇到的问题,如查询速度慢、运营成本高、难以整合结构化及非结构化的数据来源,并提出了具体的改进方向和技术细节。为了帮助潜在技术人员更好地理解和准备相关技术测试,还提供了一个详细的步骤指南来构建数据管道。具体要求分为两大部分:一是在当前架构上进行操作演示,二是利用Snowflake完成未来状态架构搭建并做技术示范,同时提供了预期产出物列表、所需技能概述及观众构成等关键信息。 适用人群:对于想要深入理解数据仓库迁移流程及其技术实施的专业人士非常有价值,特别适合作为数据工程师、数据科学家和其他IT专业人士参与面试的技术评估资料。 使用场景及目标:旨在展示候选人在构建现代数据工程基础设施方面的技术和创新能力。此外还可以作为内部培训材料供团队成员提高技能,或者为计划类似转型项目的企业决策层提供借鉴参考,从而优化其自身的数据管理策略和架构规划。 其他说明:演示时间被安排为60分钟,其中包括用例讲解(5分钟)、架构讨论(10分钟

    自动封装javaBean的工具类

    自动封装javaBean的工具类

    源代码-飞翔非主流ASP爬虫伪静态缓存版 v2.0.zip

    更多毕业设计https://cv2022.blog.csdn.net/article/details/124463185

Global site tag (gtag.js) - Google Analytics