Need software that can help me in working with pixels - c

I am working with graphics in C. I find thinking about the pixel locations terrible and I am in need of a tool where I can draw images and it gives me the pixel location of that point. Please guide me.

Paint that comes with Windows provides pixel locations in its status bar.

Check out free and open source gimp http://www.gimp.org/ . It is the most highly rated open source multi os paint program by far.

I'm not quite sure what you're getting at here, however, Inkscape allows you to position and draw things on a per-pixel basis. You could draw your graphics, etc on Inkscape and use that as a reference.
Also, as Basarat Ali says, GIMP is good for this too.

Related

Best way to draw rectangles via mouse drag in React.js?

I'm trying to highlight areas of an image like how you would on your mac or windows by dragging an area with the mouse in a React.js application.
I understand this would be best done on Canvas, by overlaying the canvas over the image, and then catch the mouse events and drawing the rectangle accordingly, is there a good library or something to do this? because writing raw code to implement this seem to be reinventing the wheel.
Thanks in advance.
Not sure if this is enough to warrant a full answer but I ran into a similar situation and this library is the best I could find:
react-sketch
Admittedly though it seems the maintainer is very unresponsive/not maintaining the package which is a bit concerning.
Hope this helps :)
There are some libraries .
you can choose https://daybrush.com/scena/
and some paid libraries

Need recommendations for Image Editing Library

I am trying to create a WPF based application which will allows users to edit photos and provide features like:
Increase/Decrease Brightness
Crop
Retro looks
and lot more.
I am also looking forward to provide more fancy features like : Framing an image, print to a Tshirt, but these are low on priority.
Any open source libraries for that?
P.S -> This is a POC project, even if i miss some features it will be fine.
I would suggest you to use BitmapEffects available in WPF, the BitmapEffects make use Shading language; at present very few effects available in .net Fx. But it is quite easy create your own shaders to adjust the birghtness, gamma, colour saturation, and they can be data bound too. The great thing about shaders is you apply them to videos as well.
Shazzam Tool is on of the best tool to create shadders, it lets you try the effect on your images and generate the C# or VB.Net binding code to use in WPF/Silverlight.
I guess you have to write code to do the image cropping, or quick Google search would help.
Opensource shader effects available here in codeplex.
For a low-level library that allows GDI like operations on bitmaps please see the WriteableBitmapEx library. This is open source and as a disclaimer, I have made a minor contribution to it.
WriteableBitmapEx has functions for drawing shapes, lines, ellipses, applying filters (via matrices, e.g. convolution blur etc), rotation, resize and cropping. You would have to write your own code to apply framing but this could be done by rendering to a separate bitmap and using the Blit function.
Above all its very fast and portable, to WP7 and Silverlight!
Best regards,

Is there a way to animate the edges of an image in WPF?

We have a few icons in our WPF application. We want to do an animation, pretty much like a small beacon of light going around the edges of the animation, just endlessly going around it, and following the silhouette of the icons. We found a way to do it by manually creating a path around the icons and have the beacon follow that path (which matches the silhouette), but it's too much manual work because we have a lot of different shaped icons. We're wondering if there's a way for WPF to do this automatically, so we just have to program it once, and then using on the rest of the icons.
Any suggestion very welcome.
Thanks.
Edit
Something like this.
Gee. Isn't that overkill to use wpf animation capabilities for that? Can't you just create a bunch of small animations in Photoshop or using something else and just put them in?
Like animated .GIFs. the only problem would be that: if I'm remembering it right, WPF have problems with animating .GIFs as embedded resources. So you have to load them from the disk. Or you can have them as embedded resources, but you have to extract them temporarily to the disk and then load them into your app's window.
If you are using .NET 3.5 SP1 or greater and you are requiring a code solution instead of the animated GIFs, my suggestion would be a Pixel Shader. You would need to write your own Pixel Shader that does the following:
Detect the edges. http://www.codeproject.com/KB/openGL/EdgeDetection.aspx
Takes an input parameter that can be animated with a storyboard that indicates the position of the beacon. http://www.codeproject.com/KB/dialog/WpfParentWindowShader.aspx
Highlights the edge that is indicated by the beacon position parameter and returns the original color for all other points in the image.
If you haven't worked with Pixel Shaders I would recommend downloading the Shazzam Tool, http://shazzam-tool.com/. It includes an interactive development environment to create and test your shader on simple images and also includes a decent number of Pixel Shaders with source code to help you learn about them.

Using 3D photos in silverlight?

I want use photos captured by 3D cameras in Silverlight 3 or 4.
I want use that photos like in maps.google.com. Is it possible to do with silverlight and if yes is there any book, tutorial, video or anything alse, from which I can learn how to use tham.
Thanks.
It is possible to convert a stereoscopic images to an Anaglyph in Silverlight.
Have a watch of this video from Mix10 Moving at 60fps. You want to be 55 minutes into the video (its mainly about video but the principles are the same).
Unfortunately Eric doesn't provide any access to the pixel shader in question.
Check this demo out. It comes with full source code:
http://www.evanjohnston.com/post/Silverlight-4-Webcams-to-the-3rd-Dimension.aspx
They use two webcams and red- and green-filter pixel shaders to separate the streams. Of course the same can be used for static images.
It can be done with panoramic images.
Here is example for cylindric images.

Display 360 Image in Silverlight 3.0 (Not Panorama)

I have a lot of images taken from a 360 camera which I would like to be able to display in Silverlight 3. They are NOT regular panorama images. The camera which took the image actually creates a distorted jpeg that becomes undistorted once wrapped around a sphere as a texture. I have desktop software that will allow viewing of the image (not just side-to-side, but straight up, down, etc.) and I need to try to get the same functionality in Silverlight. It is very similar to Google StreetView.
What I think I need is to create a sphere, wrap the jpeg on the sphere as a texture, then put the "camera" inside the sphere. I doubt this is possible in Silverlight, but perhaps there is a way to simulate this?
So far, Google searches aren't bringing anything up. Can anyone point me in the right direction to figure out how to do this? Are there any existing projects that do this?
An example of a typical image is here.
These might help you out (probably not). They are 3d engines for silverlight, but they will probably wrap the image outside of the sphere instead of inside, which is probably what you need.
Kit3D http://www.codeplex.com/Kit3D
Balder http://www.codeplex.com/Balder
Another, possibly more promising option, would be to use javascript. So far you've probably researched how to do this in Silverlight, but you might do some similar searching for using javascript for this. There may be an option out there already, and since Silverlight can interopt with Javascript, you might be in luck.
Your gonna have to map the texture to a sphere then, like you said. But afaik silverlight 3 doesn't support hardware accelerated 3d.
So your options are:
Try and find a silverlight software 3d library (Like this)
Write your own software rasterizer (multi page guide)
Hope this helps
You might want to try cropping a window from the image and display it. if the user want to go right, move the window right and crop. if the user wants to go left, move the window left and crop. to zoom out, expand the window, to zoom in make the window smaller. if you move the frame far right then stitch the image data from the left side.
You might need to modify the image to eliminate the distortion, this shouldn't be too hard and depends on the camera lens focal length.
Don't try mapping the image to a sphere, it is much harder.
At https://hdviewsl.codeplex.com it says that HD View SL (Silverlight version) supports
"orthographic (2D), with wrapping for 360-degree panoramas"
Also you could try to port PtViewer source code to Silverlight from Java if no one else has
UPDATE:
VRLight might be the solution in your case:
http://vrlight.thecloudsite.net/
http://vrlight.thecloudsite.net/tutorial.html
http://ivrpa.org/blog/3651/vrlight_vredit_20
Its author (Jurgen Eidt) is also making cPicture (http://cpicture.thecloudsite.net/index.en.html), if you can't find him from the VRLight site, try from the cPicture one, or try from his blog at IVRPA website (http://ivrpa.org/blog/3651), which seems to have recent posts

Resources