Eclipse RCP displays images in a DecorationOverlayIcon to big, how do I get it smaller? - eclipse

I basically want to make overlays like you know them from the package explorer in eclipse, a base image, and a smaller picture laid above in the bottom right corner. I used DecorationOverlayIcon for this and fist some pics from the already existing resources just to if it works. It the overlays showed up, but even though I had given the following instructions
imageDescriptorArray[IDecoration.BOTTOM_RIGHT] = alreadyExistingImageDescriptor;
DecorationOverlayIcon(baseImage, overlaysArray);
the overlayed image was very big. Than I made my icon, which is a 16x16 .png. It like the other pictures covers up the icon almost completely. How do I make the image smaller, do I have to convert it to a smaller size like 8x8 for that, or alternatively, how do I push it further down?

DecorationOverlayIcon doesn't resize anything so you must provide small images for the overlays.
There is also no way to change the calculated position of the overlays.

Related

Image in a fixed size box?

I'm trying to display images in a fixed size box (the grey area in the image here). When the submit button is pressed new images will be fetched from the internet. But the images will be different sizes.
So to prevent the "submit" button moving up and down due to different size images (and potentially having it off the screen) I'd like the images to fit inside the box. (I suppose there are a few options there, for example having the image resize to fit in the box or having the image be clipped and still fitting in the box.) I've been messing with containers and columns etc for ages but nothing seems to work.
what is the best way to fit images of different sizes into a fixed size box ?
The Image widget can have a height be specified. You can read more about that here

upload and preview as repeated background image

I am searching for a tool on web but didnt got any success their at all. I want to have something like upload and preview the image as background as repeated one or any other alternative...
I have this sample:
How can I preview and cut the image as a perfect background image as repeated one. Is it possible in Photoshop or in some similiar products?
The trick i have recovered is crop a part of the image in a big canvas of Photoshop and then making the deuplicate copies of the layers...
If the image seems like irregular it means the cropped image is wrong so you have to change with a other or larger part of the image...
If it is regular and doesn't cut at the side onto the edge, it means image is perfect making background repeated...
Thanks...

View Behind View rolldown effect on iOS (Like folders on home screen)

What would be the best way to accomplish the home screen folder roll-open effect with views in Objective C?
I tried something similar to what MaxFish has described. You can check it here iOS Open Folder Animation Sample Code
If you take a look at the images inside the Springboard.app in your iPhone in "/System/Library/CoreServices" you can have an idea of how the animation works.
A simple version of the effect can be done this way:
Take a screenshot of the screen you want to "cut" and save it in an image
Create two imageviews each of which has a part of the screenshot (e.g. the first has the first upper part of the image as background, the second the rest), you could alternative use the same background image for both views, you have only to play with content alignments.
Place the two views on the original screen in the exact position to make them seem like one entire image perfectly aligned with the original screen.
Create a view (folder content) with its own background and whatever you want to put inside, place it at the same Y of the bottom imageview but beneath it.
Make the bottom image view scroll down for the entire size of the content view, you will see the folder content appear.
iOS version put on the sliding images some nice borders and applies fade effect which make the overall animation really cool. You can sure try and make it nice looking.
Hope this helps

image Gallery in iPhone

I need to Create an Image Gallery that may be use concept of scrolling and paging together.
When I click on a button, it will open a new view in landscape mode. This view is for my Image Gallery..
It shows 5 Images:
Centered Large Image With its description on Bottom.
Next Coming image on left side, This image is slightly tilled at some angle, Without any description at bottom.
next to next coming image on left to 2nd image.
previous image on right side, This image is slightly tilled at some angle, Without any description at bottom.
Previous to Previous image on right of 4th image
Moreover, all images should be scrollable, like when I scroll 2nd image, it will move to Center and show its description and image which is already centered move to previous image.
Sorry for my confused English, here's an example of what I am trying to obtain.
I tried for basic code of paging and scrolling but unluckily nothing helpful.
Could you give me some pointers?
Check out flowcover (see this question: Open source CoverFlow library for iPhone), which should get you started.
I think someone reported flowcover doesn't work on iOS 4.0, I haven't tried yet, ofcourse.
But, you can also take a look to this OpenFlow project, It will be help you I guess. Many people has builts their app on this library.

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.