Shape Editor - Stereotype - png format - black background - png

I am trying to create UML profiles with custom icon/images.
I understood that in order to show custom icon for my stereotype, I must use shapescript and accordingly this is done.
Now the problem is with the transparency. When I use png file with transparency it shows good in "image manager", but when I use in shape editor, I get black background, and accordingly after importing MDG Technology, the stereotype renders black background. :(
I am using png format.
Is there any workaround?
Regards
VJ

We have confirmation from Sparx that this is supported in version 13 (which is currently in Beta)
See also http://sparxsystems.com/forums/smf/index.php/topic,31019.msg225007.html

Related

Covering Background Color in Crystal-Report went Adding Watermark

Why when adding a pic for watermark, always cover the detail background color?
I have tried with another type file. But it still same result. Anyone can help me?
Crystal-Report with example watermark
Crystal Reports doesn't have very good support for the transparent layer background of most image file formats. In almost all cases, images files are converted to a Bitmap image when they are used in a Crystal Report. This causes images to have a background that is slightly off compared to the color of the reports background. Underlay and moving the image behind other objects on the report help with most issues for the report's design, but you can never place the image behind the background.
There is a workaround for this using WMF or EMF files though. These are two image file formats that work in Crystal Report and support transparent layer backgrounds. If you don't have photo editing software that can produce WMF or EMF file, then there are two ways to do this without buying additional software. The first option is MS PowerPoint. If you insert the image into a PowerPoint presentation, then right click the inserted image, you can then choose Save As Picture and WMF and EMF are both available file types for this. The second option is a website called Zamzar. This website will allow you to convert files from one file type to another. Its a fairly fast service, but they have file size limits for free users.
Always keep in mind that the image will need to have a transparent background in the original file format before converting it to a WMF or EMF file. Also bear in mind that converting files from one type to another can sometimes have unintended implications upon the quality and detail of the images. Sometimes the best way to get a good quality image is to seek out the graphic designer who produced the image and request they provide the image in the WMF or EMF file types.

iOS - color on Xcode simulator is different from the color on device

Overview
The background color of my iPhone app in the simulator (iMac) looks different from the color on the device (iPhone 3GS).
EDIT (following section has been added)
The following are all different:
story board color (xib file)
simulator color
device color
I suppose I should go with how it looks on the device.
Questions
Is this is a common problem other developers face and is there a way to match the colors (systematic procedure) ?
will the color look different on different versions of iPhone (3gs / 4 / 4s) or all the color ?
Am I missing something, is there any specific color profile I should use ?
Is there something like a rule of thumb where RGB values vary by a certain percentage ?
In iPhone 4 and 4S, do the color match the simulator ? ( I don't have a iPhone4 and 4S, so I am not sure.)
Credit goes to #jtbandes for suggesting to send screenshots which led to the solution
I am just answering the question for completeness.
Steps I followed:
Take a screenshot of image in storyboard
Take a screenshot of image in device (use mail / photo stream back to your mac)
Use color picker (part of mac OS color palette) to pick the same spot on both the screenshots
Note down the RGB values (available on the mac OS color palette) of spots chosen in step 3
compare both the RGB values and see the difference
add the RGB offset to match the color.
My RGB offset (not be followed blindly)
based on my experience, i added the following RGB values to get the color I wanted, it is only rough and worked for me:
Red +12
Green +19
Blue +16
Different angles (best to keep it horizontal)
Holding the phone in different angles also gives different shades, keeping it horizontal did give the color
As others have pointed out, this is an issue of Color Spaces.
Two tasks need to be performed:
Get the source color using the sRGB color space.
Set the color in Interface Builder, using the sRGB color space.
Task 1
You can use Apple's Digital Color Meter app to sample the required color, using the Display in sRGB option, but the output is very limited.
Another option is to use an app like SipIt (available free on the App Store, last I checked). Make sure you are sampling in the correct color space by performing:
Preferences -> General -> Color Profiles -> sRGB
You can also set your output format (e.g. hex string).
Task 2
In Interface Builder, open the Color window, choose the the second pane, choose "RGB Sliders". Then click on the cog icon to choose the sRGB color profile.
Once done, paste your color value in to the Hex Color # field
You're done! Your colors should now match.
I am not affiliated with SipIt in any way. But I've been using it for a few years and it is very handy. I'd recommend it to any designer.
The current (as of 3/17/14) CGColorSpace reference includes the following text, which says that sRGB is the native device color space for iOS.
Color Spaces and iOS: iOS does not support ColorSync, so all assets should be provided in the native device color space: sRGB.
It's about color spaces.
Make sure you are picking the color from an sRGBcolor space, and replicating its RGBA values on Interface Builder by selecting sRGB IEC61966-2.1 from the dropdown menu.
If you pick a color in one color space, and generate it in a different color space, it will look different, in spite of having replicated the same RGBA values.
Also, have in mind that when you generate a color through code, using UIColor(red:green:blue:alpha:), it's generated on the sRGB color space by default. That's why it's so convenient to use this one (instead of Adobe RGB, P3, or any other). Besides, sRGB is the standard that's most used in the industry currently.
Fun fact: That UIColor constructor I mentioned above creates colors in the sRGB space since Xcode8. Before, that function used to create them within the Generic RGB space instead. That's why it might cause confusions too.
Here is a resource that extends on the topic: https://medium.com/#volbap/working-efficiently-with-colors-in-xcode-bc4c58b16f9a
iPhone does use color space management so if you want a more "scientific" solution you can create your own color space for example with CGColorSpaceCreateCalibratedRGB. It's on Core graphics level though.
The better way to convert the RGB values to sRGB is using "Digital Color Meter" tool in mac, simply check the "Display in sRGB"
then use the sRGB values in your code instead of RGB
using this tool you can find out generic RGB color and set it directly to xcode as RGB values
One more simple solution when working with image files in your app. Firstly, set your color space in Xcode to sRGB IEC61966-2.1 and apply your colors. Then, before you import any pictures to your app, match your images to sRGB IEC61966-2.1 profile using ColorSync Utility on Mac.
Worked perfectly for me and my background now perfectly matches my imported images. Hope this helps someone.
I had a similar problem, especially with the greens in my project. My issue turned out to be that some of the assets I had were created in illustrator, and the color was set to CMYK instead of RGB. I'm not sure if this was your issue or not, but it might be helpful for those who stumble onto this question in the future. I changed the illustrator "Document color mode" to RGB and all is well.
You can use this webPage for different decks of colors in Xcode.
for example Generic and Device Colors are different a little bit.

Why images in Crystal Report with white background doesn't show as pure white?

I'm putting an image in a crystal report (using Crystal Reports for Visual Studio 2005). The image is a product logo with a white background, and the report has a white background too. But when I run the report you can see it's not quite white. The off-white color is barely visible, but it is visible and more so when printed.
I've tried a variety of image formats, and tried transparent images too but they don't seem to work (transparent pixels show as black). When I use a different image I notice that the faint non-white color changes - as if it's a function of the colors in the image.
Anyone else encountered this? Any suggestions?
It can be solved directly in the report by checking the option: Retain Original Image Color Depth.
The docs says:
If you want images in your report to keep their original color depth when they are encapsulated, select this option. Otherwise, all images are converted to 8 bits per pixel before being encapsulated.
To check this option go to:
File -> Report Options -> Retain Original Image Color Depth.
Solution to this problem is using images with low color depth. It worked for 8bit PNGs.
If you are generating your own images with Adobe Fireworks you will need to export the image as 8-bit PNG. You can do it using the export tool then in the Options tab change the format to PNG 8 as show in the screenshot below:
If your image doesn't have too much color swatches (< 256) this will not affect the quality, otherwise yes.
It sounds as though the white in the image is actually off-white - have you tried printing the image from another app, such as a browser?
Take a look at this http://kenhamady.com/cru/archives/1480
When I export a png from Photoshop using "Save for Web & Devices" The white color photoshop was picking was actually 1/0/0/0 (CMYK).
In photoshop you can edit these colors before saving, I changed this color to be completely white which seemed to fix my issue.
Programmatically I found reducing the image to 16 bit color resolved the issue
Bitmap result = new Bitmap((int)250, (int)123, System.Drawing.Imaging.PixelFormat.Format16bppRgb555);
I found that even in Crystal Reports for Visual Studio 2012 images need to be of a lower color depth than what is defaulted by many modern editors. High Res images display horribly in the crystal report viewer.
Quick Fix
In GIMP -> Image Menu -> Mode -> Select Indexed As Color Mode
In Index Color Conversion Window
Use Web Optimized pallet.
Ta da. Enjoy.

iPhone transparent images rendering poorly

I'm developing an iPad application. I have been provided with a PNG image that contains some transparency - basically a drop shadow. The problem I'm having is that this is rendering poorly within the application, both on the device and in the sim.
I've made up some samples to illustrate. The first is how the image appears in the PSD (correctly that is). The second is how it appears on the device. You can see that the strip of shadow in the middle of the image is distinctly more yellow and poorly looking.
PDF http://www.aspyre.com.au/stackoverflow/photoshop.png On Device http://www.aspyre.com.au/stackoverflow/device.png
Any ideas what I'm doing wrong?
Edit: Links to files:
- PNG
- PSD
Edit 2: I've also tried pngcrush to remove the gamma, in case that was causing a problem, but no luck. Directions I followed were here: pngcrush
The reason you're getting a colour in your shadow is because the PSD's shadow layer is set to Multiply and has a colour in it. When you export it without a background, Photoshop is unable to multiply it to anything and just uses the layer as is. You need to grab the selection of the shadow layer, create a new layer, and fill that selection with black. Then set that new layer's opacity to something that mimics the old shadow.
Also I recommend you use Save-For-Web if you don't already. The colour-profile you use isn't much of an issue then as it will be stripped. However the point is valid that you want to be in sRGB when making iPhone/iPad graphics.
Link to your PSD adjusted: PSD
Common mistakes:
Your color space is non-standard. Either use no color space, or specify sRGB (strongly preferred).
You didn't save the PNG with gamma information included.
Without access to the actual files we're grasping at straws.. Maybe you have an 8-bit instead of 24-bit png?
For your shadow, use black instead of gray. Then adjust the transparency. That should fix it.
I had a similar issue that I resolved by disabling compression for an image. This is done in XCode by removing the .png extension. You can disable png compression for an entire project by editing the 'Compress PNG Files' project setting, but it is not recommended.
More details about Xcode PNG compression: http://iphonedevelopment.blogspot.com/2008/10/iphone-optimized-pngs.html

Generating icons for iPhone UITabBar

I’ve been busy working on the graphics for my iPhone application. I started working on generating icons for my UITabBar and ran into lots of problems. How do you create these icons?
I created this solution:
http://www.nailrails.com/?p=46
Are there any shortcomings to this approach? It seemed to work for the few icons I created...
Apple's guidelines can be found at http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW1
The docs are pretty straightforward-- alpha is all that matters when the image gets loaded by the toolbar, meaning that anything that's not at least semitransparent will render in the same opaque shade. As for how I do that, I mainly use Adobe tools. Fireworks is my preferred tool but Photoshop's also more than up to it. Another one I've had good results with is Acorn, which is frankly a lot cheaper while being more than sophisticated enough for this kind of work. I'm not really a graphic designer but a certain familiarity with this kind of stuff goes with the job.
I have an article up on my site that shows how to use OmniGraffle with a template I use to create great iPhone toolbar icons in minutes:
http://steveweller.com/articles/toolbar-icons/
The template sets up a grid to work to that corresponds to one square for each pixel. You draw your icon in white on top of the black template background and then export as a PDF exactly the right area to match the icon size you need (typically 21 pixels high). Then you reimport the PDF, resize it to the final icon size (21 pixels again), and export as PNG. The template does nothing magical; it just provides an already set up working area and helps you get the final PNG right every time to the scale is correct.
You could use the same technique in Acorn or any other app that supports PDF export and layers.
(I use Gimp. Assume your icon layer already has alpha channel.)
Right click the layer, then add layer mask.
Done with option "transfer alpha channel of layer" chosen.
Select the whole layer (but not layer mask), and clear it with pure white.
Resize image to Apple-suggested size, and export it as png file.
You may also paint directly on the layer mask.