Best way to accomplish this: Imaging? [duplicate] - c#

This question already has answers here:
Load a WPF BitmapImage from a System.Drawing.Bitmap
(10 answers)
Get ImageSource from Bitmap?
(1 answer)
Closed 9 years ago.
I am reading ID tags for music files in my program. I am using Taglib sharp for this.
But what I have troubles with is when I'm reading the album-art tag.
I get the album art image just fine. But it's in System.Drawing instead of WPF's System.Windows.Media.Imaging.BitmapImage. And from what I've seen; the "Image" control inside of WPF can't use system.drawing images as a source?
What I've been doing is to save a local image every time I select a new song, and loading Imagebox.Source with a bitmapimage URI of that local image. And I'm actually smart enough to understand that it isn't such a smart solution of the problem.
But how would I set the image without saving it to a file and then opening it again?
Like if there's a similar feature to winforms picturebox.image in WPF?
I hope you all understand what I'm trying to tell you guys.
Thanks in advance.

I have an open source library called TagDotNet that might be useful to you.
SourceForge Page

Related

how to print barcode with high quality [duplicate]

This question already has answers here:
printing quality winform
(4 answers)
Print a Form at higher dpi than screen resolution
(2 answers)
Printing Windows Form
(4 answers)
Closed 5 years ago.
I am creating an image of a ticket with System.Drawing.Graphics in WinForm C#.
The image contains a text which I generate with Graphics.DrawString, A logo that I load with Graphics.DrawImage, And a barcode that I manually draw with Graphics.DrawLine.
The generated image looks great digitally but the problem is that at the moment of printing the image looks great except the barcode, that is printed with poor quality, I had already tried many libraries to generate bar codes, but the bar code continues to print with poor quality, so I choose to draw it manually, but regardless of my effort, it still looks with low resolution.
If someone knows any configuration to generated and printed my barcode with high resolution I would appreciate it very much for your help

Fetching images with c# htmlagilitypack [duplicate]

This question already has answers here:
Fetching google images using htmlagilitypack
(3 answers)
Closed 8 years ago.
I am trying to fetch images from sites like Google images and yandex (a russian search engine).
I use xpaths for the purpose. While, on yandex, i am able to fetch the image thumbnails (ie, their urls), i am not able to fetch the bigger image (which is possibly javascript generated, when one clicks on the image).
On google images, I am not able to fetch even the thumbnails. The xpath that i use for google images is:
#"//div[#class='rg_di']/img"
Can anybody help me with this?
Try this XPath instead: #"//div[#class='rg_di']//img". You should note that the img tag is not directly under the div tag as your XPath expression states (// instead of /).

how to read image from url and save it into internal storage for windows 8 with c# [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to use httpwebrequest to pull image from website to local file
Let said, I have a picture a http://abc.com/image/abc.jpg and I would like to download it and save into the own storage in my windows 8 store application (not store into the picture library), so that my application can call and display the image and the image is not seem from picture library.
how to achieve the above task with c# ? code samples? thanks!
Probably better to let the browser cache this as that plumbing is already in place.
If you really want to pull this off, use HttpWebRequest is the class to use and How to use httpwebrequest to pull image from website to local file seems to have a descent answer.

facebook photo upload [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
multiple upload images on c#/jquery
hey guys!
Yesterday i made here a question about an input type="file" to select multiple files instead of one. And you gave me some solutions like plupload and SWFUpload and some more.
But if possible i want to try something a little bit different, like facebook. The solution that you offered me yesterday have flash, or silverlight, html5, gears or browserplus...
So if you could show me an example like the photo upload of facebook or another i would be very happy!
Regards!
Try: Multiple Upload images with c#/jquery?
Facebook's uploader is a Flash uploader. View the source.

How to resize animated gif file using C#? [duplicate]

This question already has answers here:
How to resize an animated gif image using C#?
(3 answers)
Closed 9 years ago.
Dear all,
I need to re-size an animated gif file on my provided size, using C#.How can i do that.I search the solution on the google but don't get any proper solution.I already see the atalasoft,codeproject,giflib on codeplex but non of this is proper solution.So, Please help me just re-size an animated gif file using c#.
thanks in advance
Riad
Actually, no quick-and-dirty method exists.
You will need to split the GIF into separate frames, then re-size each individual frame, then re-assemble the GIF image.
And sorry, I do not have the code to provide you, other than to refer you to Google
Atalasoft's DotImage should be fine, and they even have sample code on their site.

Categories