GithubHelp home page GithubHelp logo

photoshopreader's Introduction

PhotoshopReader

Swift library to read Photoshop PSD files.

Example Usage

Add the following line to your project's SwiftPM dependencies:

.package(url: "https://github.com/hughbe/PhotoshopReader", from: "1.0.0"),
import PhotoshopReader

let data = Data(contentsOfFile: "<path-to-file>.psdb")!
let document = try PhotoshopDocument(data: data)
print(document.header)
print(document.colorModeData)
for resource in document.imageResources.resources {
    let data = try ImageResourceBlockData(resource: resource)
    print("\(resource.id.hexString): \(resource.data.count) bytes")
}

if let layers = document.layerAndMaskInformation.layerInfo?.layers {
    for layer in layers {
        for additionalInformation in layer.additionalLayerInformation {
            let data = try AdditionalLayerInformationData(layer: additionalInformation)
            print("\(additionalInformation.key): \(additionalInformation.data.count) bytes")
        }
    }
}

photoshopreader's People

Contributors

hughbe avatar

Stargazers

 avatar Shankeerthan avatar bob avatar Jan Kowalewicz avatar shimabukuro256 avatar  avatar David Crooks avatar joqqy avatar Leibniz Li avatar Paul Ollivier avatar  avatar Isuru Dissanayake avatar Matthieu Kopp avatar

Watchers

James Cloos avatar  avatar Paul Ollivier avatar Isuru Dissanayake avatar  avatar

photoshopreader's Issues

PhotoshopReader can't access font details like fontFamily & size

Please anyone help me on how to access text fonts, I've tried this but not getting !

let info = AdditionalLayerInformationData.typeToolInfo(try TypeToolInfo(dataStream: &dataStream1))

let info = try? TypeToolInfo(dataStream: &dataStream)

 print("info = ", info)

Screenshot 2021-07-08 at 4 37 26 PM

Screenshot 2021-07-08 at 4 37 42 PM

Inclusion of tests makes the package very heavy

hello
I am using SPM to access your framework in xCode. I regret that this package is soooo big (its one the heaviest I am using). IS there a way to avoid downloading all those test images?

Matthieu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.