.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

problem with XamlReader Load/Parse image

Posted By:      Posted Date: October 04, 2010    Points: 0   Category :WPF
 

I got error with this below:

string imageCompXaml = serialized image (bitmap)

Image imgObj = XamlReader.Parse(imageCompXaml) as Image

err: Property 'UriSource' or property 'StreamSource' must be set

i can workaround the problem by

  imgObj = new Image();
  imgObj.BeginInit();
  imgObj.Source = BitmapImageObject;
  imgObj.EndInit();

problem is by doing i missed out lot of other details.

I have a string, this is the serialized of the Image object, which is BitmapImage

I missed out the Image.prop details, like the width/height.

the image size is not same as the BitmapImage object, its a scaled/sized-down bitmap.

so using the 2nd Source workaround, i can't get back the actual image sizing (b4 serialize)

is there a way i can tackle at the XamlReader.Load/Parse() to resolve the err

or how to get back the image prop/details with my workaround?




View Complete Post


More Related Resource Links

problem with XamlReader Load/Parse image

  

I got error with this below:

string imageCompXaml = serialized image (bitmap)

Image imgObj = XamlReader.Parse(imageCompXaml) as Image

err: Property 'UriSource' or property 'StreamSource' must be set

i can workaround the problem by

  imgObj = new Image();
  imgObj.BeginInit();
  imgObj.Source = BitmapImageObject;
  imgObj.EndInit();

problem is by doing i missed out lot of other details.

I have a string, this is the serialized of the Image object, which is BitmapImage

I missed out the Image.prop details, like the width/height.

the image size is not same as the BitmapImage object, its a scaled/sized-down bitmap.

so using the 2nd Source workaround, i can't get back the actual image sizing (b4 serialize)

is there a way i can tackle at the XamlReader.Load/Parse() to resolve the err

or how to get back the image prop/details with my workaround?


datalist image slide show problem

  

hi friends


i am binding  images dynamically(back end)for a datalist .iam applying a slideshow for it .I am getting a problem to apply slideshow for dyanmically binded images.If the define in a div statically it working perfectly

for example pls go through my code below:

<script type="text/javascript">
$(document).ready(function() {
    $('.slideshow').cycle({
        fx: 'scrollLeft' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
    });
});

<div class="slideshow">
        <img src="images/30_dummy.jpg" width="200" height="200" />
        <img src="images/aquarius.gif" width="200" height="200" />
        <img src="images/star.gif" width="200" height="200" />
        
        <img src="images/the-proud-indian-flag-1.jpg" width="200" height="200" />
    </div>


I above code works perfectly and the slide show e

Session problem with display of image in row of reportviewer

  

Hello techies...

I am new to this sql reporting service. But anyhow by surfing I am able to bind the report but i was stuck in image display.

Anyways, i also managed that. But the real problem is whenever i was keeping a image control in rdlc report i was having session prob. If i remove the image control then as usual report works fine.

Please suggest me some solution.... either for session problem or for image display. I am keeping the image name in database but for binding the rdlc report i am using a store procedure which return the path (static) concating with the image name(kept in database).

Hope to find a solution .....


Problem with passing an Image as binary through web service

  

All

I have a web service that is accessed by a windows forms application and receives updates like facility name, address, image etc. Everything works fine except the image data is not being passed to the windows app. I am saving the images in database on both sides, so when I pull it from the server I use the following code

if (!reader.IsDBNull(floorPlanOrdinal))

facility.FloorPlan = (byte[])reader["FloorPlan"];

I can see the facility.FloorPlan Dimentions as 103840 when I debug this method which means that the data is pulled from the database fine.

On the forms side though the dimentions become 0, all other values pass fine except this. Here is the facility property in the web service on server side.

using System;

using System

How to solve the problem " FAILED TO LOAD udRBIctrls.ocx" Your version may be outdated??

  
I am getting the error message "Failed to load control 'udspinbutton'from udRBIctrls.ocx.Your version of udRBIctrls.ocxmay be outdated.Make sure you are using version of the control was that was provided with version". I have windows server 2008 64-bit o/s. I have installed my application on it. But in the application when i click few of the tabs of my applicaiton the above error message is being shown. I have searched the internet for the file , but didnt find it on the internet. Please help me to solve the problem.   

Unable to load workflow actions from the server - problem!

  
Hi, I have problem on Sharepoint 2010 RTM (new installation). I use workflows from the begining and I had no problem since yesterday. I tried to make custom workflow and the SP designer has frozen when saving it. Since than I get message "unable to load workflow actions from server. Please contact your server administrator." every time I want to customize or make new workflow. Need fast solution, Please help. Regards, Luka

grid view image delete problem

  
i have a grid in which i am showing a record with image, when user delete the record the image also deleted and when it again enter the record it upload the new image but display the deleted image from the cache example: name.jpeg upload, then deleted, a different file with the name.jpeg upload, it showing the deleted one. 

Load and parse a file where the file path is located in a column of a flat file source

  
Hi, I have a situation where I have a CSV that contains a bunch of data that populates a bunch of related tables with FK constraints directly.  Thats no problem.  The problem is that one of the columns specifies a filepath to an XML file that is supposed to contain data to be populated in a table with an FK constraint.  How do I specify the file name to the XML source component at runtime? For example TableA has columns: TableAID GroupName TableB has columns TableBID TableAID (FK to Table A) MemberID (the data in question) TableA has a 1 to many relationship with Table B. The CSV has a bunch of columns including: TableAID File path to list of members for each group. I don't know how to solve this problem.  I tried using a ForEach ... but I couldn't get it to work. Thanks in advance for any assistance.

Problem with AJAX - " Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'Syst

  
Hi., I'm using Visual Studio 2008 and i downloaded the toolkit from Codeplex, I downloaded the zip file which i've marked red in the below link.. This is my code, <form id="form1" runat="server"> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager> <asp:Panel ID="Panel1" runat="server"> Hi Simbu AJAX Works Fine ! </asp:Panel> <asp:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" TargetControlID = "Panel1" Radius = "6" BorderColor = "#FBB117" Corners = "All" > </asp:RoundedCornersExtender> </form> & this is the error i get, " Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' " I saw this post, http://forums.asp.net/p/1273185/3439540.aspx and i changed my TOOLSCRIPTMANAGER into SCRIPTMANAGER & now i get this error ! and now c what this post says... http://forums.asp.net/t/1529516.aspx NOW WOT AM I SUPPOSE TO DO ??? PLZ GUIDE ME ! I'm struck up with this since 2 days....

image caching problem in internet explorer

  
i have built a custon aps.net image controls, which currently refresh the image via javascript and ajax.in firefox, google chrome,.. it works perfectly, but (suprise), there is problem in internet explorer 6 and 7. IE didn't relase the old (previous) image, so all images will be saved in the cache and ram consumption of the browser rises until it crashes...the javascript code:function getNextImage(clientId) { if (busy) { window.setTimeout("getNextImage('" + clientId + "')", 100); return false; } busy = true; //Send the request to server with the current image url as the argument var element = document.getElementById(clientId); var func = "CallServer(" + element.src + ", '')"; var sor = element.src; func = "CallServer" + clientId + "('" + sor + "', '')"; window.setTimeout(func, 0); } function ReceiveServerData(rValue) { //Receive server's response of a string rValue, which is prepared in the server's function //GetCallbackResult() var wds = rValue.split(";"); //Assign the transition effect var photo = document.getElementById(wds[0]); photo.style.filter = wds[2]; //Preload the image file from server. When finishing download, imageLoaded function will be called //with t

Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when

  
We are migrating our application from windows server 2003 32 bit to windows server 2008 64bit, after I have created the virtual folder on the new machine, I am unable to connect to the database. We have oracle 11g client installed and below is the error which I am getting - </BR></BR> System.InvalidOperationException: Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) at System.Data.Common.UnsafeNativeMethods.OCILobCopy2(IntPtr svchp, IntPtr errhp, IntPtr dst_locp, IntPtr src_locp, UInt64 amount, UInt64 dst_offset, UInt64 src_offset) at System.Data.OracleClient.OCI.DetermineClientVersion() --- End of inner exception stack trace </BR>Any help is greatly appreciated, I have tried couple of solutions going through some threads online but no luck.

ASP.NET: How to Load image and save to database form clientside

  
Hello, can any one help? I am using HTTPHandlers for loading the image from the database I need to change the image and save it back to the database from the client side, that is I need to browse image at client side and save the image as bytes in to databases, how to do this? Regards, satish  

How to get x:Name from 3DElements using XamlReader.Load

  
I would like to get all Names from DependencyObject- Elements in my Viewport3D. As we know: none of the 3D Elements has a Name Property, so x:Name is used for instance description. How can I resolve the x:Name for every Element in my 3D tree?A nice Trick to locate the name of an 3DElement is to get all Fields that where generated for the x:Names:FieldInfo[] fieldInfos = rootElement.GetType().GetFields( BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);And then compare the object thats given back from FindName(fieldInfo.Name) with all 3DElements in tree. Something like this:foreach (FieldInfo info in fieldInfos){  if(compareDepObj == FindName(info.Name))     compareDepObjHasNameInfoName }This works fine when I load a compiled UserControl assembly. But when I use XamlReader.Load/Parse I could not find any of the x:Name Fields. I think they must be there because a FindName(X:NAME) always works. And Documentation for x:Name says:"x:Name is used by a XAML processor to register a name into a namescope, even for cases where the page is not compiled (for instance, loose XAML)."Do I use the wrong BindingFlags? Has anybody an Idea?ooK

image flickering problem on css togle

  

Hi,

I am trying to use and modify this sample by WebDesignerWall.

What i've done is add a litle JavaScript to togle the visibility of pin. The pin will be clickable.


problem: The left image works like a charm. The right one is the problem. When you try to click the pin and position the cursor in upper half of the pin, just outside the bounds of div then the pin starts to flicker. How to bypass that? Maybe with JavaScript event fireing just once, how? I'm also opened to other solutions of achieving the same efect.

p.s.: At the end i will be using Obout's ImageZoom instead of <img>.


the sample (copy/paste and it will work, images are linked dir. to web)

<head runat="server">
    <title></title>
    <style type="text/css">
        .photo
        {
            margin: 30px;
            position: relative;
            width: 180px;
            height: 130px;
            float: left;
        }
        .photo img
        {
            background: #fff;
            

Reporting Services Chart in SharePoint Web Part, Broken Image Problem

  
Hi,
I have a reporting services report that displays a dundas chart, it is a snapshot report executed daily.  When displaying the report inside a page viewer webpart or a report viewer web part in SharePoint, the first time after a recent snapshot occurs, the image shows up broken.  On refresh of the page the image is visible.

MOSS 2007
SQL Server 2005 Reporting Services NOT running in SharePoint Integration mode.

Any ideas or work arounds to get the image to display on the first load of the page or why the image is broken?  I've tried different report parameters, Format, ClearSesson with no luck.  Viewing the report in Report Manager works fine and also going directly to the ReportServer page is fine.  It only occurs when it's inside of SharePoint inside of the Page Viewer or Report Viewer web parts or even if I manually create an iframe in a content editor web part.

Thanks!

Image Refresh problem

  
Hi

Im quite new to WPF and I'm stuck with an refresh issue.
The scene is as follows:

1) I have a form with an image on it.
2) A screenshot is made, and saved to the above mentioned image. (from the app)
3) The image should be refreshed to show the new image (but same file)

However I can not get it to work.
I can see the file is changing on the disk (viewing it and timestamp) and even in the WPF designer the image changes, but not in the running app :-/

I don't know what wrong. (other than the image does not refresh). So can anyone help?
My code is as follows:

XAML:

<Window x:Class="Imagetest.Window1"

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Title

Binary Data Problem....save and retrive image data from sql database

  

hello friends...please help me to solve this problem....

i have created crud (create, retive, update and delete)form and it's running... here i want to add images for each record(sql database)....

i'm using image datatype in sql table for picture.....

Q 1: how to save and retrive binary data(image) from sql table in asp.net form using vb coding?

Q2: can i create sql table which store binary(image url) data direct?

thank you


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend