ما هو PGM؟ تنسيق Portable Graymap موضح

PGM (Portable Graymap) هو العضو الرمادي من عائلة Netpbm، أنشأه جيف بوسكانزر، يخزن صور الرمادي غير المضغوطة في شكل ASCII أو ثنائي.

أداة تحويل ملفات مجانية عبر الإنترنت. تعمل على Chrome وFirefox وSafari وEdge وOpera والمتصفحات الحديثة الأخرى على Windows وmacOS وLinux وAndroid وiOS. لا حاجة لتثبيت برامج أو تسجيل. تتم جميع التحويلات مباشرة في متصفحك، لذا لا تغادر ملفاتك جهازك. مجانية للاستخدام بدون حساب.

Image

ما هو PGM؟ تنسيق Portable Graymap موضح

العضو الرمادي من عائلة Netpbm، يخزن صور الرمادي البسيطة غير المضغوطة.

آخر تحديث:

Year1988
TypeRaster image (grayscale)
UsageGrayscale interchange

What is it?

PGM, the Portable Graymap format, is the grayscale member of the Netpbm family of image formats developed by Jef Poskanzer. It extends the simple Netpbm design to store gray-level images where each pixel holds a single intensity value.

A PGM file begins with a magic number, P2 for the plain ASCII variant or P5 for the binary (raw) variant, followed by the width, height, and a maximum gray value, then the pixel data. The maximum value defines the white point and allows either 8-bit or 16-bit gray levels, with no compression applied.

Technical Specifications

DeveloperJef Poskanzer (Netpbm)
File Extension.pgm
MIME Typeimage/x-portable-graymap
Released1988
CompressionNone

Pros & Cons

Advantages

تخزين رمادي بسيط

PGM cleanly represents gray-level images with a minimal, easy-to-parse structure.

متغيرات عادية وثنائية

The P2 ASCII form is human-readable, while the P5 raw form is more compact for the same image.

عمق بت قابل للتعديل

The maximum gray value field supports both 8-bit and 16-bit precision per pixel.

محمول ومدعوم جيدًا

It is widely handled by image-processing toolkits and is easy to generate programmatically.

Disadvantages

رمادي فقط

PGM cannot store color; color images require the related PPM format.

لا ضغط

Uncompressed storage makes files larger than compressed grayscale formats such as PNG.

بيانات وصفية بسيطة

The format carries only essential image dimensions and a max value, with no rich metadata support.

When to Use It

PGM is a convenient intermediate format for grayscale image processing.

مدخلات رؤية الكمبيوتر

Many image-processing and vision tools accept PGM grayscale images for analysis.

تحويلات Netpbm

PGM serves as an intermediate when converting grayscale images between formats.

بيانات علمية وعمق

Single-channel intensity or height data can be stored straightforwardly as PGM.

How to open a PGM file

Software for working with PGM files can be categorized into professional tools, free/open-source applications, browser-based solutions, and built-in utilities. Professional tools are suited for users needing advanced features and high fidelity, while free/open-source options cater to those who prioritize cost-effectiveness and community support. Browser-based solutions offer convenience for quick tasks without installation, and built-in utilities provide basic functionality for casual users.

When choosing software for PGM files, factors such as feature fidelity, whether the focus is on editing or viewing, cost model, and platform compatibility are crucial. Users should consider their export needs, as some applications provide robust conversion options while others may be limited. In some cases, converting PGM files to more widely supported formats may be a better move for compatibility and ease of use.

GIMP 2.10.34

Windows, macOS, LinuxFree (GPL)

GIMP is a powerful open-source image editor that supports PGM files for both viewing and editing. It allows users to manipulate grayscale images with high fidelity, making it suitable for detailed graphic work.

الميزات الرئيسية
  • Advanced layer and mask editing
  • Customizable brushes and filters
  • Support for high bit-depth images
  • Batch processing capabilities
  • Extensive plugin support
نقاط القوة
  • Highly customizable interface and tools
  • Robust community and support resources
  • No cost for full feature access
القيود
  • Steeper learning curve for beginners
  • Performance can lag on large files

يصدّر إلى: PNG, JPG, TIFF, BMP, GIF

الأفضل لـ: GIMP is ideal for users needing a comprehensive editing suite for PGM files without the cost.

زيارة GIMP →

ImageMagick 7.1.0-16

Windows, macOS, LinuxFree (Apache License)

ImageMagick is a command-line tool that excels in converting and manipulating images, including PGM files. It is particularly useful for batch processing and automation of image tasks.

الميزات الرئيسية
  • Command-line interface for automation
  • Batch conversion of multiple files
  • Extensive format support and manipulation
  • Image resizing and filtering options
  • Support for scripting and integration
نقاط القوة
  • Powerful for batch processing tasks
  • Lightweight and fast performance
  • Highly versatile with scripting capabilities
القيود
  • No graphical user interface
  • Requires command-line knowledge

يصدّر إلى: PNG, JPG, TIFF, GIF, BMP

الأفضل لـ: ImageMagick is perfect for advanced users who need powerful batch processing and automation for PGM files.

زيارة ImageMagick →

IrfanView 4.60

WindowsFree for non-commercial use

IrfanView is a lightweight image viewer that supports a variety of formats, including PGM. It is designed for quick viewing and basic editing, making it user-friendly for casual users.

الميزات الرئيسية
  • Fast image viewing and browsing
  • Basic editing tools like cropping and resizing
  • Slideshow creation capabilities
  • Support for plugins to extend functionality
  • Batch conversion and renaming features
نقاط القوة
  • Extremely fast and lightweight
  • User-friendly interface for beginners
  • Good support for batch processing
القيود
  • Limited advanced editing features
  • Windows-only platform

يصدّر إلى: PNG, JPG, BMP, TIFF, GIF

الأفضل لـ: IrfanView is suitable for users who need a quick and easy way to view and perform basic edits on PGM files.

زيارة IrfanView →

Photoshop 2023

Windows, macOS$20.99/mo (Subscription)

Adobe Photoshop is a leading professional image editing software that supports PGM files. It offers extensive editing capabilities, making it suitable for high-quality image manipulation and design work.

الميزات الرئيسية
  • Comprehensive layer and mask editing
  • Advanced color correction tools
  • Support for 16-bit and 32-bit images
  • Extensive filter and effect options
  • Integration with Adobe Creative Cloud
نقاط القوة
  • Industry-standard editing tools
  • Rich feature set for professional use
  • Seamless integration with other Adobe apps
القيود
  • Subscription model can be costly
  • Complexity may overwhelm new users

يصدّر إلى: PNG, JPG, TIFF, PSD, PDF

الأفضل لـ: Photoshop is ideal for professionals who require advanced editing features and high fidelity for PGM files.

زيارة Photoshop →

Convert PGM Files Free

Use our free online image converter to convert PGM and other formats - no signup, no watermarks.

Try Image Converter Free

References

  1. PGM Format Specification - Netpbm Official Documentation
  2. Netpbm - Wikipedia
  3. Netpbm formats - Just Solve the File Format Problem