photoshop

Conversion from CMYK to RGB with Pillow is different from that of Photoshop

假如想象 提交于 2019-11-29 02:06:19
I need to convert an image from CMYK to RGB in python. I used Pillow in this way: img = Image.open('in.jpg') img = img.convert('RGB') img.save('out.jpg') The code works, but if I convert the same image with Photoshop I have a different result as shown below:- The only operation done in photoshop is to change method from CMYK to RGB. Why there is this difference between the two RGB images? It can be a color profile problem? SOLVED The problem is that Pillow does not know the input ICC profile, while photoshop had one set as default. Photoshop use for CMYK : U.S. Web Coated (SWOP) v2 RGB : sRGB

How can I map Photoshop's level adjustment to a Core Image filter?

泪湿孤枕 提交于 2019-11-28 20:55:49
I'm mapping several photoshop elements to CIFilter, the only one I'm having trouble with is this Levels Adjustment: Which CI Filter (or combination of filters) would let me utilize the 16, 1.73, 239 & 39/245 above in the first example or the 31, 1.25, 255 30/255 in the second example. I believe this is a kind of shadow/black and white level adjustment. Any help appreciated. jakber By adapting the formula from this page: http://http.developer.nvidia.com/GPUGems/gpugems_ch22.html , I believe you can do this using a combination of CIColorMatrix , CIGammaAdjust and another CIColorMatrix . Let's

Convert letter-tracking value set in Photoshop to equivalent letter-spacing in CSS

你。 提交于 2019-11-28 20:37:05
问题 I am currently building a site from a PSD. Most of the fonts have a letter-tracking of -25 ( <- AV-> : I'm guessing that is the symbol for letter spacing?). How would I get the same effect in CSS? I know the property is letter-spacing: X but it doesn't take percentages and -25px or pts would be a huge figure! 回答1: You can use the em dimension instead of px , thus sizing the spacing relative to the font size (so photoshop's 25% is somewhere around .25em ). 回答2: In Photoshop letter-spacing is

Draw an Inset NSShadow and Inset Stroke

▼魔方 西西 提交于 2019-11-28 19:19:47
问题 I have an NSBezierPath and I want to draw in inset shadow (similar to Photoshop) inside the path. Is there anyway to do this? Also, I know you can -stroke paths, but can you stroke inside a path (similar to Stroke Inside in Photoshop)? Update 3 static NSImage * graydient = nil; if (!graydient) { graydient = [[NSImage alloc] initWithSize: NSMakeSize(22, 22)]; [graydient lockFocus]; NSGradient * gradient = [[NSGradient alloc] initWithColorsAndLocations: clr(@"#262729"), 0.0f, clr(@"#37383a"), 0

Editing Photoshop PSD text layers programmatically

僤鯓⒐⒋嵵緔 提交于 2019-11-28 18:27:26
I have a multi-layered PSD, with one specific layer being non-rasterized text. I'm trying to figure out a way I can, from a bash/perl/python/whatever-else program: load the PSD edit the text in said layer flatten all layers in the image save as a web-friendly format like PNG or JPG I immediately thought of ImageMagick , but I don't think I can edit the text layer through IM. If I can accomplish the first two steps some other programmatic way, I can always use ImageMagick to perform the last two steps. After a couple of hours of googling and searching CPAN and PyPI, I still have found nothing

Photoshop Script: layout images like flickr

心不动则不痛 提交于 2019-11-28 14:39:32
I am looking for a script that would open a given number of images with different aspect ratios and layout them all in a single document like the flickr gallery. Something as seen in this page: http://martin-oehm.de/data/layout.html Is there any script/plugin out there that can do this? The purpose is just to create a reference file with all the images instead of having several images floating around. Thank you The fact that you have had no answers in 10 weeks should tell you that Photoshop is maybe not the best/easiest place to do this.... so, I made the following script that does it pretty

Inner shadow in Core Graphics

时光怂恿深爱的人放手 提交于 2019-11-28 08:36:29
I want to do something similar to Photoshops inner shadow effect in Core Graphics. If I draw/fill a path with this effect, I want get something similar to the following: Here are the layers you need to create to make this image, from back to front: The base color, in this case a white background. The shadow. The shape casting the shadow. This is made by finding the bounding box of the inner shape, expanding that box by more than the width of the shadow, then cutting a hole in the box with the inner shape. Clipping these with the inner shape. Then finally drawing the surrounding colored shape,

Find and replace text in multiple Photoshop files?

旧巷老猫 提交于 2019-11-28 07:53:10
问题 Let us say I have six Photoshop files: 1.psd, 2.psd, ..., 6.psd. All of these files contain the word "LoremIpsum" in random text layers, within each document. Is there a way I can search for "LoremIpsum" in all documents and replace it with "Dolor Sit Amet", all in one go? I have tried finding and replacing software (including powerful tools like Power Grep) but they do not work with psd files... Maybe Photoshop variables? However, they only work for one document at once... Thanks! 回答1: Use

Font looks different on photoshop and at website

蹲街弑〆低调 提交于 2019-11-28 03:34:00
问题 Simple question: Why this 2 fonts looks different at photoshop and at website. At this picture - this first text is from html code, second is an image from photoshop. The same font, the same size - 30. But this first looks more "bold" than second. Why? I want to have a identically font as it is at photoshop (second picture). Here css code: @font-face { font-family: "SegoeWP"; src: url("fonts/play/SegoeWP.eot"); src: url("fonts/play/SegoeWP.eot?#iefix") format("embedded-opentype"), url("fonts

Do PNGs (or JPGs) have a DPI? Or is it irrelevant when building for retina?

廉价感情. 提交于 2019-11-28 02:55:12
问题 A simple question that I have been having great difficulty finding a definitive answer to: do PNG files have a DPI? Or perhaps more importantly, is it even relevant when building retina-enabled sites/apps? I've just received PSD assets from our designer for a retina iPad app that I must convert into HTML for display within the app. Typically, I receive such files as 2048x1536 @ 72 DPI -- double size but standard screen DPI. I then typically use CSS to tell the browser how to display it. But