I know this is leaning more in the direction of a designer question, but as I am faced with developing something which requires me to crop an image, I thought I would give the question a shot.
This seems like a ridiculous question to ask, but I've look all over the IDE (Expression Blend 2) to try and find a way to crop my image, but I can't figure it out.
This seems to be very much in line with Joel's question and is discussed in Podcast 58 in the sense that I'm a complete noob when it comes to designing in Expression Blend. I am adamantly interested in figuring out the most efficient way to do this. I found an article that describes a work flow you can go through that will produce a crop, which I added as an answer below, but I'm really hoping someone else will know of a quicker (less clicks) way to do something as trivial as this.
Does anyone know how this can be done?
As far as I know, there's no way to crop an image directly in expression Blend. Blend is not an image editing application. You need another tool for that.
What you can do though, is clipping an image if you only want to show a portion of it. Just add a rectangle on top of it right-click it, go to path -> make clipping path.
alt text http://img200.imageshack.us/img200/7370/example1.jpg
Now select the System.Windows.Controls.Image entry from the list you want to apply the clipping on and hit Ok
You can even use rounded rectangles, circles and custom paths to clip, but in most cases a rectangle will do the trick.
Just ran into another way.
Have a look at this question. It uses a CroppedBitmapClass as the source of an image. It's not actual drawing in Blend, but you can add it by hand editing Xaml. From your question it's not clear if you are creating a Silverlight or a WPF application in Expression Blend. The CroppedBitmapClass is available in WPF only.
With the new Silverlight 3 you can use the WritableBitmap to do image cropping:
I found an article that has steps to do an image crop, but it's very drawn out to do such a simple operation. You would think something that MS Paint can do in a couple button clicks would be similarly easy in Blend.
Here's the link.
I'm still wondering if there's an easier way to do this, however.
The other problem with this approach is that afterwards, I can't change the size of the rectangle that I'm cropping the image with, which I need to be able to do, because I have to have the image be an exact number of pixels in width and height.
Related
First off I'm not totally sure if "texture masks" is the correct term to use here so If someone knows what it is then please let me know.
so the real question. I want to have an object in GameMaker: Studio which as it moves around it's texture changes depending on its position by pulling from a larger static image behind it. I've made a quick gif of what it might look like.
It can be found here
Another image that might help explain this is the "source-in" section of this image.
This is a reply to the same question posted on the steam GML forum by MrDave:
The feature you are looking for is draw_set_blend_mode(bm_subtract)
Basically you will have to draw everything onto a surface and then using the code above you switch the draw mode to bm_subtract. What this will do is rather than drawing images to the screen it will remove them. So you now draw blocks over the background and this will remove that area. Then you can draw everything you just put on the surface onto the screen.
(Remember to reset the draw mode and the surface target after. )
Its hard to get your head around the first time, but actually it isn’t all that complex once you get used to it.
I want to remove the regular strips of the image as shown as follow. I try many methods, and they do not work, such as image media filter and FFT filter.
Could you tell me how to remove the strips?
All that black is removing a ton of information from the image. You have two options available - either re-capture that missing information in a new shot, or attempt to invent / synthesize / extrapolate the missing information with software.
If you can re-shoot, get your camera as close to the mesh fence as you can, use the largest aperture your lens supports to have the shallowest possible depth of field, and set your focus point as deep as possible - this will minimize the appearance of the mesh.
If that is the only still you have to work with, you've got a few dozen hours of playing with the clone and blur tools in front of you in just about any image editing software package you like.
Photoshop would be my go to tool of choice for this. In Photoshop CS5 they introduced something called content aware fill. I'm not sure if it will help you in this specific case because there is SO MUCH black that Adobe's algorithm may think other parts of the mesh are valid sources for filling in the mesh you're trying to clear out.
We are attempting to expand text in Visual Studio. Our current attempt consists of creating transparent intraline adornments at certain points in the text.
We have just stumbled upon a disadvantage to this method. Namely that when the given text has a background classification attached to it, the classification breaks and the result looks like this:
We are currently researching possible ways of solving this by:
Inspecting the current classification of the text and drawing a colored intraline adornment.
Drawing the background manually, by drawing in an adornment layer below the text.
However, both of these solutions seem very hacky.
What would be the best way of going about solving this problem?
You're asking how to hack around a standing limitation in the editor, so there isn't a great way :-/
My background color fix extension does what you're suggesting in #2, so you could start from there. I haven't tested it since VS2010 or so, so it may fail in interesting and exciting ways.
live2d can animate a picture and make small movements, just as they show in this video.
1 Does anyone know how it works?
2 Is there any paper describe the mechanism behind it? I tried google scholar search but find few.
3 Is there any open source work on this field?
The fundamental algorithm is like control points in Adobe Illustrator. Control points are like anchors for the image. You can shrink, stretch and bend the image by moving the control points.
Unfortunately, NO. Live2D is all developed in the company.
For now it is all closed project.
I'm sorry if my question is somewhat vague. It's been a few years since I did anything with Qt, and back then I never did any fancy image stuff. What I'm asking for below is just some general suggestions on which classes to consider using. I'm trying to avoid barking up the wrong tree from the very start.
The situation: I'm writing a Qt-based program in which I need to display a somewhat large (let's say 5000x5000) raster image. The user should be able to zoom (quickly) in and out, and pan around the image in a way similar to for example Google maps. So far, this is not very different from the Qt ImageViewer example, except perhaps for the requirement that zooming happens quickly. However, I need to draw on the order of 50k simple geometric shapes (let's say circles) on top of the image, and be able to add and remove some of these in a simple way. The circles should have the same size no matter the zoom level, and should thus either be redrawn whenever the user zooms, or should be drawn with vector graphics. Think of the circles as map annotations. These should look the same at any zoom level, and also behave nicely with respect to panning.
I guess my question is twofold:
Can Qt draw vector graphics on top of a raster image?
In general, which classes should I consider for the above?
Thanks in advance. I don't like answering vague questions myself, but maybe someone with experience with Qt's graphics capabilities has an answer.
I suggest you use QGraphicsView and friends for this. It helps handling all the view/world transformation and the vector items can be achieved with various QGraphicsItems.
You can change the sizes of the items whenever the zoom level changes to maintain constant apparent sizes.