PSD
The Social Democratic Party (Portuguese: Partido Social Democrata, PSD) is a liberal-conservative political party in Portugal.[1] Founded on 6 May 1974 as the Popular Democratic Party (Partido Popular Democrático, PPD) by Francisco Sá Carneiro, Francisco Pinto Balsemão, and Joaquim Magalhães Mota amid the transition to democracy following the Carnation Revolution, it adopted its current name on 3 October 1976.[2] Despite the nomenclature evoking social democracy, the PSD operates as a centre-right entity aligned with the European People's Party, emphasizing market-oriented policies, fiscal responsibility, and institutional stability.[1] The party has alternated governance with the centre-left Socialist Party (PS) as one of Portugal's two dominant political forces since democratization, forming administrations during periods of economic liberalization and European Union integration. Notable achievements include the decade-long premiership of Aníbal Cavaco Silva from 1985 to 1995, which advanced privatization, structural reforms, and Portugal's preparation for eurozone entry, contributing to sustained GDP growth averaging over 4% annually in the early 1990s.[3] Under Pedro Passos Coelho from 2011 to 2015, the PSD-led coalition implemented austerity measures as part of an international bailout, reducing public debt from 130% of GDP in 2014 and restoring fiscal balance, though these policies sparked protests over social costs such as increased unemployment and cuts to public services.[3] In recent years, under leader Luís Montenegro since 2022, the PSD spearheaded the Democratic Alliance (AD) coalition to end eight years of Socialist rule, securing a plurality in the March 2024 election and, after a government collapse amid parliamentary gridlock, winning the snap May 2025 legislative election to form a minority administration focused on tax cuts, housing deregulation, and anti-corruption measures.[4] The party's tenure has involved tensions with the rising far-right Chega party, rejecting alliances despite shared opposition to the PS, while navigating controversies such as Montenegro's past legal representation of a gaming firm in regulatory disputes, which drew opposition scrutiny but did not derail the 2025 campaign.[5] By October 2025, the PSD further consolidated local power, capturing key mayoral races in Lisbon and Porto.[6]Computing and Technology
File Formats and Software
The PSD (Photoshop Document) format serves as the native file format for Adobe Photoshop, enabling the preservation of complex raster image data including multiple layers, layer masks, adjustment layers, vector shapes, text, channels, and transparency.[7] Introduced with early versions of Photoshop, it uses a proprietary structure beginning with an 8-byte header signature "8BPS" followed by a version number (typically 1 for standard PSD files), image dimensions, color mode details, and depth information.[8] Subsequent sections include color mode data blocks, a resources block for metadata like resolution and ICC profiles, an extensible layer and mask information block supporting hierarchical layer groups and blending modes, and compressed image pixel data (via RLE or ZIP methods).[8] This layered architecture allows non-destructive editing but limits file size to 2 GB and dimensions to 30,000 pixels in width or height.[9] For documents exceeding these constraints, Adobe developed the PSB (Photoshop Big) format, which uses version number 2 in the header and supports files up to 300,000 pixels per dimension while maintaining backward compatibility for smaller files savable as PSD.[8] PSD supports various color modes such as RGB, CMYK, Lab, grayscale, and bitmap, with bit depths from 1 to 32 bits per channel, and includes optional thumbnail previews for quick viewing.[10] However, advanced features like smart objects, 3D layers (deprecated in later Photoshop versions), or certain plugin-specific data may not render identically across software due to the format's proprietary elements, even though Adobe published a technical specification in 2013.[8] Adobe Photoshop provides complete read/write support for PSD files, including all features from version 1.0 (Photoshop 3.0, 1994) through current releases as of 2025, such as Photoshop 26.x.[7] Related Adobe applications like Photoshop Elements offer partial compatibility, focusing on basic layers and edits but omitting professional tools.[7] Third-party software varies in fidelity: GIMP (GNU Image Manipulation Program) imports PSD layers and masks but flattens effects like gradient fills or unsupported blending modes, as its support relies on reverse-engineered parsing rather than official licensing.[11] Photopea, a browser-based editor, claims comprehensive PSD handling for opening, editing, and saving, including layer styles and vector data, tested against Photoshop outputs.[12] Other tools like Krita and Paint.NET enable PSD viewing and basic editing with layer preservation, though they convert or discard proprietary elements such as type layers or clipping masks to maintain compatibility.[13] Commercial libraries like Graphics Mill provide programmatic PSD rendering for developers, extracting individual layers and metadata without full visual editing.[11] Overall, while PSD's widespread adoption stems from Photoshop's dominance in digital imaging, interoperability issues persist in non-Adobe environments, often requiring export to universal formats like TIFF or PNG for cross-application workflows.[8]Development and Programming
Adobe released a detailed specification for the PSD (Photoshop Document) and PSB (Photoshop Big) file formats in 2016, enabling developers to implement reading and writing capabilities in third-party software without requiring a license for basic format handling.[8] The document outlines the binary structure, starting with a fixed 14-byte header containing signature ("8BPS"), version (1 for PSD, 2 for PSB), and metadata like image dimensions (up to 30,000 x 30,000 pixels for PSD, larger for PSB) and channels (up to 56).[8] Subsequent sections detail color mode data blocks, resources (e.g., resolution, thumbnails), layer and mask information (including nested groups, adjustment layers, and masks), and pixel data compressed via RLE or ZIP methods.[8] Files larger than 2 GB must use PSB, which extends PSD with 64-bit addressing.[7] Implementing PSD support involves parsing these hierarchical elements, but challenges arise from the format's complexity, proprietary extensions (e.g., smart objects, blending modes), and incomplete documentation for certain advanced features, leading some developers to reverse-engineer undocumented parts.[14] For instance, layer records include length-prefixed data for masks, channels, and additional layer information, requiring careful handling of variable-length fields and endianness (big-endian for most data).[8] Developers often validate against Photoshop-generated files, as the spec focuses on core structure but omits behavioral details like rendering algorithms.[15] Several open-source libraries facilitate PSD manipulation across languages. In Python, psd-tools provides compositing, layer extraction, and basic editing by decoding images, text, and groups per the spec, supporting PSD versions up to Photoshop 2023.[16] For JavaScript, ag-psd enables reading and writing of layers, masks, and smart objects, with updates as recent as October 2025 incorporating fileformat.info details for edge cases.[17] C++ options include psd_sdk for direct parsing of nested layers, transparency masks, and vector data without external dependencies, targeting game engines and asset pipelines.[18] Commercial wrappers, such as PSD for .NET (via Python integration), allow layer editing and format conversion in enterprise apps.[19] These tools typically prioritize read access, with write support limited to avoid compatibility issues with Photoshop's proprietary optimizations.[20]| Language | Library | Key Features | Source |
|---|---|---|---|
| Python | psd-tools | Layer compositing, image decoding, text extraction | [16] |
| JavaScript | ag-psd | Read/write layers, masks, smart objects | [17] |
| C++ | psd_sdk | Nested groups, masks, no dependencies | [18] |
| Java | java-psd-library | Basic parsing (historical, limited maintenance) | [21] |