Giter Site home page Giter Site logo

appiconautomaker's Introduction

Hi there 👋, my name is Kito0615

The road is obstacle-packed and long. But you will get through if you keep going.

I am a macOS Application Developer. I have learned Objective-C , swift and python. I love code. Love to learn anything attractive.

Skills: Objective-C / Swift / Python / Bash

  • 🔭 I’m currently working on this page.
  • 🌱 I’m currently learning Python and Swift
  • 📫 How to reach me: [email protected]

github website

Top Langs

Kito0615's GitHub stats

appiconautomaker's People

Contributors

bringbird avatar josephchang10 avatar kito0615 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appiconautomaker's Issues

Note the Px to Pt scale of your PC screen

The scale factor from Px to Pt is 1 in antique Mac but 2 in retina screen of contemporary Mac.
We have to take it into account that the coordinate system is all about pt when we call -[NSImage drawInRect:](and some identical/similar methods).But it'll count on px dimensions with the app icons applied in our projects.
It's necessary to convert the size defined in SizeFile.plist to a px-consistent size like this

  • (void)outputImage:(NSImage *)image InfoDict:(NSDictionary *)infoDict keysArr:(NSArray *)keysArr {
    //Reckon on a intermediate view to calculate the scale of current screen
    NSView *view = [NSView new];
    // Figure out the scale of pixels to points
    CGFloat scale = [view convertSizeToBacking:CGSizeMake(1,1)].width;

    for (NSString * sizeKey in keysArr) {
    NSDictionary * iconInfoDict = [infoDict objectForKey:sizeKey];
    NSString * iconSizeString = [iconInfoDict objectForKey:@"Dimensions"];
    NSSize iconSize = NSSizeFromString(iconSizeString);
    NSString * iconName = [iconInfoDict objectForKey:@"Name"];
    [self outputImage:image withSize:CGSizeMake(iconSize.width/scale, iconSize.height/scale) andName:iconName];
    }

    [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"file://%@", self.pathFiled.stringValue]]];
    }

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.