I am making a custom file type, and I would like to have my application set the icon for the file without changing th icons of other files of the same type. Here is basically what I want users to go through to set the icon.
Open the application
Push a button (opens an NSOpenPanel)
Select an icon
Save the file
An alternative is to use my very simple, built in image editor. How can I accomplish this?
A good example is an image file. If you save an image from Photoshop, the file's icon is a miniature version of the image you saved. I want it to look and act just like that, if possible. Any ideas?
Edit: The file is supposed to save NSData. It is not actually an image file, but it includes the icon image.
Just use the setIcon:forFile:options: method of NSWorkspace, which will do exactly what you want.
Related
Hello I made a spritesheet in photoshop. The process to make the spritesheet was fairly easy. The issue is when importing to Unity I get a white background and I don't know how to remove the white background from my spreadsheet in unity. I have taken the following steps to resolve this issue
First unchecked the background in photoshop.
Second I tried to remove background from each individual image in photoshop.
But no luck can someone help.
You can select the asset and change its type to Sprites, instead of Default (in the Inspector); if you've already done that, how about trying .png files?
In one of the updates to Unity of last year, they removed the option to use the image transparancy as alpha when using .psd files. The option was a checkbox in the import setting of the image, which is no longer shown.
You can however use an import preset with a preset that still has this option set.
What you can do is:
Create a preset when in the texture-importer panel. How to make a preset? What is the texture-import panel?
Open the file which was created (e.g. myimporter.preset). You could use a file explorer in your project and search for the name
Then set these values to 1:
propertyPath: m_PSDRemoveMatte
propertyPath: m_PSDShowRemoveMatteOption
Apply this preset to all your psd files inside unity.
Now, importing a .psd file should work fine with transparancies.
Note: Unity's intent was for users to import .png files when dealing with transparancies. But I found it annoying to manually re-import all my .png files when i made changes to the .psd file.
Please, help me and tell me what am I missing.
My goal is to display simple PDF file (stored locally for example) in the WebView control. Can I bind path of the file to the Source property of the WebView? Or what is the correct way to show PDF in UWP?
P.S. and if the only option is to do like here - how must I add pdf.js to my project??
My goal is to display simple PDF file (stored locally for example) in the WebView control.
If you want to display pdf in WebView control, then the methods in Display a Local PDF File in a WebView is most like the only way to solve your problem.
You can follow the steps in the xamarin official document, and here are some additional tips we need to pay attention to:
After downloading pdfjs, for UWP app, you need to copy the entire folder into the Assets folder, make sure that the folder is named "pdfjs", otherwise you will need to modify the code to change the path.
Your .pdf file should be stored into the Content folder under the Assets folder, it means you will need to create a new folder named "Content" under Assets and copy your .pdf file into this folder. Otherwise, you will also need to modify the code to change the path.
After copying your .pdf file into the "Content" folder, don't forget to change the Build Action of this file to Content like this:
Or what is the correct way to show PDF in UWP?
In uwp app, you can use Image to show PDF file, you can refer to the official PDF document sample. But I don't know if PDF can be displayed as Image in Android and IOS apps, since you're developing a cross-platform project, I think it's better to use the built-in method to solve such problem.
If a demo for xamarin UWP is needed, you can leave a comment, I will upload my demo later.
I have bought graphics from a graphics designer. He gave me a psd file with buttons and logos all in the same file. In the file there is a specific button I want to use for my project. How would I export only the button portion of the file to a png or jpeg?
using the eyeball toggle buttons on the right-hand panel, hide all elements you don't want
then go file > save as
give it a name and type of file you want to save as
What you can do in order to get just the single button or logo is something like what Miles said, but that might leave you with some extra blank space that you don't want.
Turn off all layers you don't want to save.
Select the crop tool and crop exactly what you want to save.
File - > Save for Web - > Select PNG or JPG and all other settings
Hope this helped!
here a little contribution :
calibrate your screen, check your color profile, turn you image in RGB mode or Grayscale (8 or 16 bit). ;)
Turn off layer you don't want to save, on windows shortcut "ALT+ left click" on layer eye you want to keep.
trim layer with menu/image/trim... Transparent Pixels
File / Save for Web / Select PNG-8 check transparency, click "Save..." choose a name and save button.
You can use shortcut for do it much more faster.
Of course you can make a Scripts in Scripts panel for repeat this action many times.
You can use free extension like cutandslice.me for export to different device in one shot.
Best wish.
http://www.blendswap.com/blends/view/73614
I have downloaded this and want to use my own text on it using Blender (or another program). It is not used for commercial purpose. When I open it, I get no option to edit text. I tried edit external and GIMP which failed.
the .blend file is binary and can only be opened inside of Blender, When you create text objects they are displayed as objects inside blender. You should be able to find the object by using the object browser section inside blender and changing it there. You may have to recreate the text object depending on how the author did the original.
I have around 20 PSDs which I need to show to a few programmers. Is it possible to upload them somewhere where they can view them but not download?
Or only option is to convert all of them to JPGs one by one?
Thanks
You can use google docs to view .psd online. Upload it to docs.google.com, select the file to view, then before sharing click "File" and toggle "Prevent viewers from downloading"
Use Photoshop actions to batch convert many psd's to jpgs and upload the jpg's. If you fear that they can misuse jpg's too, add a watermark over your jpg images.
Pipeline to do this could be:
Window -> Actions
Open your PSD file
click, in Actions window, on the button in lower right corner "create new action"
Name your action
Click Record
Your actions are now being recorded.
Layer->Flatten image (take care now - not to accidentaly save your PSD as flattened!)
If it is an cmyk, convert it to rgb,if it has bleed, crop off the bleed part
Resize your image if needed image -> image resize
File -> save as...JPG
Close image
Stop recording action.
Now you can run that action on whole folder where your PSD-s resides:
File -> automate -> Batch
Choose your action, and chose your folder.
Choose your source folder... twaeak a little... and magic will start to happen!