I have an application which the main form of it its called Fmain. How can i make the Fmain to be the PNG image which i have as Image1 assigned in my source?
FMain.brush.bitmap:=Image1.picture.bitmap;
that's for if the Image1 is a *.bmp one, but i need the transperancy of my PNG file.
I don't think you will be able to make a custom shaped TForm with a transparent png.
Have a a look at this answer Irregularly shaped forms and more specifically to this http://docwiki.embarcadero.com/Libraries/XE2/en/Vcl.Forms.TCustomForm.TransparentColorValue .
Are you wanting to make a form that has an odd shape? As in, you want to have the transparent parts of the PNG not be clickable as a form? If so then you are going about it the wrong way. If you were to put an image on the form and set the transparent properties on the image, then all you will do is see the form behind the image.
If you want to have a form that is the shape of the visible area of the PNG then you need to create an oddly shaped form. This is done by using regions and SetWindowRgn.
Luckily there is a handy tool out there for this: Gabes OddForm Assistant. I have used this to great effect a number of times.
In order to use it you will need to save your PNG as a bitmap and then load it into the utility. Once it is done it will give you the code required to make the form. You can just have a look in the pas file it creates and see how it is done, tinkering if you feel the need. You can either use the form directly or graft the code to where you need it.
Hope this helps.
Related
I'm trying to create segmented parts of an image... like the top right square of an image can be highlighted or clicked on while the rest of the image isn't. I tried to google this stuff and I found codes related to container but I'm not sure if that's what I want.. How can I make parts of image segmented so I can fire events on mouseover/mouseselect etc...
You could either define a hitArea (http://www.createjs.com/Docs/EaselJS/classes/DisplayObject.html#property_hitArea) if your image only requires one segment or if you want multiple clickeable areas on one image: Split up the image through using multiple Shapes via beginnBitmapFill (an example for bitmapFill can be found here: http://jsfiddle.net/lannymcnie/nmLhu/) and then put the listeners on the individual shapes.
I'm the beginner of image processing by using MATLAB and i have to do some tasks, i want to crop or cut for the specific area like using imcrop but want to make it automatic (i cannot upload picture because i'm the new user, the picture that i use is the cross-section of a plant) i really don't know how to detect and cut out only that area. I'll really appreciate if there's someone can help me to figure out this problem.
You need to give us more information. If you want to automate the detection of a part of an image to crop it, you need to do some image processing. What kind will depend on the characteristics of your images and the part you want to crop.
You can post an image using, for example, http://www.postimage.org/
I have a project that will require free transforming an object like this ( http://alias.io/raphael/free_transform/ ) except with an image (png). After the image is manipulated, I will then need to send the image to a web service using AJAX Post. Can anyone help with an example?
Raphael is not designed for images processing, really. I would suggest that you store the parameters the user chooses (the rotation, scale, etc.) and then apply them to the original image in plain javascript. If you stick to affine transformations, it would suffice to store the positions of the four corners of the image and apply, e.g., bilinear interpolation. Or even better: send the parameters and the image back to the server and do it there.
I'm making cuts of an image to use in various parts of my website; The header, the footer, etc. When I copy and paste to a new layer, it leaves a "feathered" edge. even though I have this set to zero. There is a 1 pixel margin around all of the copy and pasted images, that, when assembled as a web page using CSS, leaves little lines between all of the images. I was a professional graphic designer but I've been out of the game too long (2 whole years). God help me.
I'm not 100% sure of the source of the initial assets such as the header and footer, so I'm a little confused (some links might be nice), however it is worth checking a few things just to make sure. Hit M for the marquee and check thats feather amount. L for the lasso (long shot) and check that too, also check for any layer styles.
A nice little alternative, if you are exporting out individual assets,is go to File > Scripts > Export Layers to Files. This may save you a lot of trouble in the long run.
Hopefully this may help...
Additionally how are you copying? Is it from inside Photsohop or are you placing the layers? Are you using the marquee tool?
for try, don't use crop tool.. use select tool instead. select tool provides pixel level accuracy.
In addition to feather, try turning off anti-aliasing in your selections. After you make a selection, in the select options toolbar uncheck 'Anti-alias'.
If this is set photoshop will try to average the edges of the selection with the surrounding pixels to make it 'blend' better. This is worse than useless if you're trying to make accurate, pixel-level selections.
In Photoshop CC, after selecting with the marquee tool, right click to access the Feather option. Enter 0.1 and then copy and paste. That should take care of it.
I just encountered this problem. I'd cut and pasted and then dragged into a new image which created a new layer with the paste on. I then realised that the feathering was wrong. I changed the settings but forgot to change the active layer back to the background layer, so I was cutting and pasting the feathered cut I did originally. Facepalm.
I have an image with picture of a person and I want to let the user to pick some area of the person and change the color. But how can I best create a multi-mask image?
E.g. should the user be able the change the color for a leg or a hand.
I am using Titanium Appcelerator, and right now I had a solution with buttons placed over the image, which is not a pretty and accepted solution.
The Kitchensink example, has only one area which can be changed.
The only solution I found for working with sections of an image is to divide the image into different views then use a vertical or horizontal view to glue them together. Sounds like you took a similar approach using buttons.
Another option might be to use one of the jQuery image libraries within the webview. This most likely will have a performance penalty though.