Xamarin Forms CarouselView Image Binding Error - image

I am using the Carousel View to display a frame that includes both images and text. I am retrieving the data from an API, the text binds properly to the labels, but the byte array does not properly bind as the image source. I have tried setting the source of an image external to the carousel view called "bell_img" and it shows the image from the byte array properly. I have also tried binding the image source inside the carousel view to an image that I have stored as a resource in my application, this image is showed properly inside the carousel view. Its very strange that the byte array image does not work only inside the carousel view, because both the things I have tried show that
ImageSource imageSource = ImageSource.FromStream(() => new MemoryStream(event_list[i].image)); (works correctly)
And that the binding is also correct because it works with images in my resource folder.
CODE
When setting ImageSource2 as the binding, instead o ImageSource, the image shows correctly.

Related

How to dynamically merge two photos into a new image

I'm grabbing photos from FB's API and I'd like to merge a transparent filter on top and then save it as a new image to then post is a new picture to FB. I've looked into using Canvas however toDataURL() only works when the photos are on the same server. I've also tried using the filter as the src for an image and setting the fb pic as the background image but you can't save it off as this as it's editing through CSS. Any suggestion on how to actually blend the photos together and actually be able to save as a new image?

Orchard Blog Post Media Picker Image Resized

I've spent about 3 hrs last night trying to determine why the image that I upload via the Media Library Picker field keeps resizing to 200x200 when it is displayed in a blog post.
Its not resized after upload and if I insert that same image into the blog post it retains the original size.
I haven't done anything special, I just edited the Blog Post content definition by adding the Media Library Picker field. When I create new blog post, I click the Add button to select the media and then publish the post.
See sample screencap: http://imgur.com/Ju3Sryp
Thanks for the input!
By default, when you are displaying a media library picker field, it gets rendered by Modules/Orchard.MediaLibrary/Views/FieldsMediaLibraryPicker.cshtml. That template loops over the media parts in the field, and calls Display(BuildDisplay(content, "Summary")). That builds the shapes for each of the media content items pointed to by the field. One of these shapes is going to be a Parts_Image shape in your case. Notice that in the BuildDisplay call, a "Summary" display type was passed in. That means that the Parts/Image.Summary.cshtml template is going to be used to render each image. That template has the following code to render the image:
<img width="200" height="200" alt="#mediaPart.AlternateText"
src="#Display.ResizeMediaUrl(
Width: 200, Height: 200, Mode: "crop",
Alignment: "middlecenter", Path: mediaPart.MediaUrl)" />
This is what resizes the image to a 200x200 cropped thumbnail.
If that's not what you want, you'll have to override one of those templates. I'd recommend creating an alternate for FieldsMediaLibraryPicker.cshtml for the specific filed name that you've been using, and in the code, change the display type from "Summary" to "Detail". This way, the Image.cshtml will get used for each image, and that will not do any resizing.
Image resizes into shape by default. You should enable Shape Tracing Module than reload your page than expand shape tracing tool from page bottom than click on the image than create and change alternate.

CorePlot chart not showing up in PDF made with -dataWithPDFInsideRect

I'm generating a PDF from a view using -dataWithPDFInsideRect:.
Within the view is a CPTXYGraph which displays wonderfully in a Window but doesn't show up in the PDF at all.
I also tried putting an NSImageView into my view, then generating an NSImage from my core plot chart and putting that NSImage into the NSImageView.. but the NSImage is just empty white.
How can I either:
a) Include a Core Plot chart in my View such that it will be shown in the PDF generated by -dataWithPDFInsideRect:, or..
b) generate a proper NSImage from my Core Plot chart so that I can put it into the NSImageView whic will then show up in the PDF.
If the graph is the only thing displayed in your view, get the PDF data from it directly using the -dataForPDFRepresentationOfLayer method. This will give you a PDF that preserves text and lines as objects so that it will scale smoothly. Otherwise, use the -imageOfLayer method to retrieve an NSImage of the graph layer.

Image not assigning in Unity3d

I'm currently working on a puzzle game project in Unity3D and when I'm trying to assign a new image in script in the inspector view, it is still reading the old image by default. But the the field now has updated to new image name, and if I delete the old image, it is not showing up any image at all, just a gray color object.
What's wrong?
This is the image of the inspector view
The gray color means there is no image defined for that object. Try to make sure you have the reference to the image setup. Also try to reopen the scene to see the reflected changes.

Before Binding how to get the image in WP7

I have worked for Image binding for listbox. For that I have binded the Image Url to Image Source. My proplem is someURL not valid does not contain image. Normally I have loaded defalut image for no url contains items.
That not valid url, binded the image as empty pixel. In this i want to show default image. If no pixel in image means, binding not needed.
string Url="Some URl.jpg";
Binded this "URL" to the Image.
Pls Help me
For this try to give a background image in your image content which is equal dimensions of ur image content..by default it shows the background image when no image in the URL.
Use Stackpanel at background, so when image is loading , it will show by default color of stackpanel, and when image is loaded it will show Image, thereby hiding the background color
StackPanel background = new StackPanel();
background.Background = new SolidColorBrush(Colors.LightGray);
Image img1 = new Image();
img1.Height = 250;
img1.Stretch = Stretch.UniformToFill;
LowProfileImageLoader.SetUriSource(img1, new Uri(n.Image, UriKind.RelativeOrAbsolute));
background.Children.Add(img1);

Resources