Displaying images in a DW (Getting image dimensions)

PB9.0
Hi all.
Can some one help me with the following please: -
I want to display an image in a dw.
The user types the path and name of the file to be displayed
in a text box. I then need to display this in the image
object in the DW (this I can do), the problem is the image
is being distorted based on the sixe of the image object.
How do I get the dimensions of the actual image (could be a
bmp, gif or jpg file) so I can set the image object size
just prior to loading ?

Thanks
0
Davie
12/13/2004 2:12:12 PM
sybase.powerbuilder.general 62418 articles. 19 followers. Follow

6 Replies
1081 Views

Similar Articles

[PageSpeed] 36

You could purchase a 3rd party DLL that has functionality to read the file's
dimensions.

A cheaper but conceptual not so nice solution is to open a hidden window
with a picture control on it.
read the file into a blob and call SetPicture( blob ). Next you can read the
control's dimensions.

HTH

Arnoud



<Davie> wrote in message news:41bda33c.2cd8.1681692777@sybase.com...
> PB9.0
> Hi all.
> Can some one help me with the following please: -
> I want to display an image in a dw.
> The user types the path and name of the file to be displayed
> in a text box. I then need to display this in the image
> object in the DW (this I can do), the problem is the image
> is being distorted based on the sixe of the image object.
> How do I get the dimensions of the actual image (could be a
> bmp, gif or jpg file) so I can set the image object size
> just prior to loading ?
>
> Thanks


0
Arnoud
12/13/2004 2:42:54 PM
Davie suggested that:
> PB9.0
> Hi all.
> Can some one help me with the following please: -
> I want to display an image in a dw.
> The user types the path and name of the file to be displayed
> in a text box. I then need to display this in the image
> object in the DW (this I can do), the problem is the image
> is being distorted based on the sixe of the image object.
> How do I get the dimensions of the actual image (could be a
> bmp, gif or jpg file) so I can set the image object size
> just prior to loading ?

This link may help you out:

http://groups.google.ca/groups?hl=en&lr=&threadm=40bc91de%241%40forums-2-dub&rnum=1&prev=/groups%3Fq%3Dimage%2Bsize%2Bphil%26hl%3Den%26lr%3D%26group%3Dsybase.public.*%26selm%3D40bc91de%25241%2540forums-2-dub%26rnum%3D1
0
Spidey
12/13/2004 2:56:01 PM
Try using the dimensions of an actual picture control to help you.

dw_1.object.p_1.filename = ls_image

//p_1 is a picture control outside of your datawindow on the window
p_1.SetReDraw(FALSE)
p_1.PictureName = ls_image
p_1.originalsize = TRUE
p_1.SetReDraw(TRUE)

dw_1.object.p_1.width = p_1.width
dw_1.object.p_1.height = p_1.height


I hope this helps,

Brad

Davie wrote:
> PB9.0
> Hi all.
> Can some one help me with the following please: -
> I want to display an image in a dw.
> The user types the path and name of the file to be displayed
> in a text box. I then need to display this in the image
> object in the DW (this I can do), the problem is the image
> is being distorted based on the sixe of the image object.
> How do I get the dimensions of the actual image (could be a
> bmp, gif or jpg file) so I can set the image object size
> just prior to loading ?
> 
> Thanks

0
Brad
12/13/2004 3:21:52 PM
I have used a free api called GFL.  Check it out at http://www.xnview.com/

The tool is very solid.  I have supplied them with a PB example.

HTH

-- 
PB9.01.7236
Thank you,

R.Chauvin
<Davie> wrote in message news:41bda33c.2cd8.1681692777@sybase.com...
> PB9.0
> Hi all.
> Can some one help me with the following please: -
> I want to display an image in a dw.
> The user types the path and name of the file to be displayed
> in a text box. I then need to display this in the image
> object in the DW (this I can do), the problem is the image
> is being distorted based on the sixe of the image object.
> How do I get the dimensions of the actual image (could be a
> bmp, gif or jpg file) so I can set the image object size
> just prior to loading ?
>
> Thanks 


0
Bob
12/13/2004 6:53:35 PM
Ok, thanks guys. The code you supplied is pretty much what I
came up with, but it is good to know I was on the right
track.
Cheers
Davie

> I have used a free api called GFL.  Check it out at
> http://www.xnview.com/
>
> The tool is very solid.  I have supplied them with a PB
> example.
>
> HTH
>
> --
> PB9.01.7236
> Thank you,
>
> R.Chauvin
> <Davie> wrote in message
> > news:41bda33c.2cd8.1681692777@sybase.com... PB9.0
> > Hi all.
> > Can some one help me with the following please: -
> > I want to display an image in a dw.
> > The user types the path and name of the file to be
> > displayed in a text box. I then need to display this in
> > the image object in the DW (this I can do), the problem
> > is the image is being distorted based on the sixe of the
> > image object. How do I get the dimensions of the actual
> > image (could be a bmp, gif or jpg file) so I can set the
> > image object size just prior to loading ?
> >
> > Thanks
>
>
0
Davie
12/14/2004 8:28:18 AM
Bob Chauvin ( Paix dehors ) suggested that:
> I have used a free api called GFL.  Check it out at http://www.xnview.com/
> 
> The tool is very solid.  I have supplied them with a PB example.
> 
> HTH

Bob, thanks for the link, this is a nice API to images.  Any chance you 
could throw you code up on codeExchange?
0
Spidey
12/14/2004 3:28:43 PM
Reply:

Similar Artilces:

display image in a image image button
hi   i have to display an image in image button while uploading mycode Image1.ImageUrl = Upload.PostedFile.FileName; is not working thanks Hi You need to save the PostedFile to the disk on the server and then assign it to ImageUrl. Take a look at the following links for more infoprmation on how to do this.  http://www.codeproject.com/KB/aspnet/netimageupload.aspx http://www.stardeveloper.com/articles/display.html?article=2003022601&page=1Reza Nassabehwww.professionalcsharp.comDon't forget to click "Mark as Answer" on the post that helped you. That way ...

Getting images from db and displaying in WebControls.Image
So I have the following code which is getting my image, but unfortantly all that is displayed is a 'x' where the Image controls is placed.  In the main aspx.cs page:1 //get the image in bytes from the database 2 byte[] imageInBytes = image.LoadImage(Convert.ToInt32(dr.ItemArray[3])); 3 4 //place in memory stream 5 System.IO.MemoryStream memoryStream = new MemoryStream(imageInBytes, 0, ...

Display image from image
Let me explain more. I have a Gridview, that displays an image.  Then i have a detailsview displaying an image from the selected value in the gridview.  Simple.  When i click on one of the images from the gridview, it displays the correct image in the detailsview.  Basically, i have two images in each row of the table in the database.The only way this works is if i have "autogenerateselectbutton=true" set.  I do not want the select link next to my image.  I want to be able to pick on the image in the GridView, and have it show the correct image in...

Can I display an image without getting the image from a URL?
From what I've read, it appears you can take an image and create a thumbnail of it with the result being a type 'image'. However, a search of dozens of sites suggests (hopefully this isn't true) that one always uses the URL of an image file to get the image to a control--meaning I can't just use the image created from the workup of an original image. I'm posting the demo code I'm trying, hoping that maybe I'm missing one or two easy steps.    Dim FullImage As Image = Image.FromFile("C:\temp\Picture1.jpg") ...

Displaying image from database(image datatype) to image control
Hie all...I'm a newbie at asp.net. I m currently using asp.net 2.0.I m having a problem with displaying images on my web form. Have tried looking thru all codes but i can't find a step by step tutorial for doing so. I understand that in asp.net 1.1, the detailsview can automatically be linked to the image field and display the image. But this is not possible now. So, i have decided to just display the image in an image control.from my understanding, 1. retrieve image from database and convert it to temporary image file in a file path. 2. use the image control's imageurl to point to the file....

Image in image
Hi, I have a project where clients viewing my website can buy t-shirts. They can choose from a number of t-shirt colors and shapes which are their plain colour. They can also choose a number of prints to be placed on the t-shirt. These will be graphics stored in a database. My problem is on how I can displaty the t-shirt with the graphics or logo they chose on te t-shirt. It would be something like drawing text on an image but instead drawing an existing image on the base image. Any Ideas? (I am using visual studio 2005 and vb.NET)   RegardsMerovingian you 1. You can create a...

Imaging, but not imaging
We multicasted to 43 machines. Updated the image on the master. Multicasted the updated image to 36 machines. (the other 7 wouldn't join the session for some unknown reason). I visually verified that all 36 were imaging. One of the 8 which didn't rename appears to not even have been imaged. The problems with the previous image were still there. It's as though the machine didn't image even though I saw it take part in the session and the temp bar going across the screen. What the heck's going on here? AlaN As a try, what happens if you boot either to PXE ...

Image on Image
I am trying to display a page that has image of a map on it. The user can then place other images of red thumbtacks on the image at different locations. Then when these thumb tacks are clicked on, they open a folder of pics related to the area. I saw a method in the imageButton class that returns the (x,y) of the location where the user clicked. I thought I could use this information to place another, smaller image button, on that area. My problem is that i can't seem to get the bottom imageButton to be transparent so I can see the smaller one. Am i on the right track with this. Any advi...

image and image
// create an image object, using the filename we just retrieved System.Drawing.Image image = System.Drawing.Image.FromFile(Server.MapPath(file)); // create the actual thumbnail imageSystem.Drawing.Image thumbnailImage = image.GetThumbnailImage(64, 64, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), IntPtr.Zero);   now my question is how to display this image in my image1 control in asp.net (version 1.1) the below line of code is not working.  Image1.ImageUrl=thumbnailImage.ToString();Mark As Answer If my reply helped you. Hi, you can save t...

Save Image Path into Database, Retrieve Image Path by Particular Image ID and Display Image through Gridview
Hi All, Currently, I have a file upload control in my aspx page to allow user to upload images. When the user clicks the SAVE button, the image will be saved in a particular folder named 'PMap' that located within the website. What I am trying to do here is to direct all uploaded images into a common image folder (in this case 'PMap') and then, retrieve the images and displayed it through a Gridview according to its respective image id. I have managed to store all uploaded images into a common image folder, PMap. However, I hope advice can be given on my following pro...

cannot get "display original image" in menu when right click on image
Name: jim rinaudo Email: jim.rinaudo_at_netscape.com Product: Firefox Summary: cannot get "display original image" in menu when right click on image Comments: I use netscape accelerator at max accel and need to show the original image. IE has the menu item, foxfire does not. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051107 Firefox/1.5 ...

How to click a image to display a full dimension image on a new window using C#?
I use the following the code to display a image 1.gif (actual dimension is 400*200), I set the 1.gif display only half dimension 200*100 because of webpage layout. I hope to display full dimension in a new window when I click the image, how can I do? thanks! <img src="../bmp/1.gif" alt="Click here to display full dimension"  width="200" height="100">       SuperCool Multiple ZIP - A utility to unzip multiple files and work with multiple zip filesSuperCool Random Number Generator This way use this javascript...

How to Insert Image Url and Display the Image of that Image Url in the Grid View?
Any one can help me out about this- How to Insert Image Url and Display the Image of that Image Url in the Grid View Hi You can add HyperLink control to Gridview by setting its ImageUrl and NavigationUrl property Please refer example. <asp:HyperLink ID="HyperLink1" ImageUrl="images/image.gif" NavigateUrl="PageUrl.aspx" runat="server">HyperLink</asp:HyperLink>Please mark the post as answered if it helped you. Hi sandynaidu, This is easy to solve. Assuming that your GridView's ID is gv, that you want to have the image in your firs...

How to Display Image on Image control
 Dear All forum memberI am using <cc1:FileUploaderAjax> </cc1:FileUploaderAjax> for uploading image to database.I want to display the image in a image control as soon as user will finish his  browse for selecting Image before going to database. If any other way is possible with out using <cc1:FileUploaderAjax> </cc1:FileUploaderAjax> , that will also fine for me, but it should be ajax enabled.Mark As Answer if it helpsThanks & RegardGyana Ojha...

Image not displayed in image button
Hi all, I created a custom web control imagebutton and I had set the  imageurl  for imagebutton. See the code in default.aspx:<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %><%@ Register Assembly="WebControlLibrary1" Namespace="WebControlLibrary1" TagPrefix="cc1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/199...

Displaying image in image button
Yes, I am obviously a loser. I have an image button, and have an image. I put the image in the same directory as the form that i am running, and simplyreferred to the image by its name: imageURL="P107005.JPG" But, the image doesn't show. I also attempted to refer to the image by its hardcoded directory placement, but have proven to be a failure at that, too: imageURL="//localhost/csASPServerControlBasics2_P105/P107005.JPG" Anyone tell me what I am screwing up? ~Mike dude check if using this path is correct. imageURL="//l...

display Image selected Image
Hello, i have a uploadfile control on hte form, what i want to do? is when i select an image from the uploadfile control and click on the upload button and display it without post back, following is my code.------------------------------code starts here------------------------------------------<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">    <title>Untitled Page</title></head><body>    <form id="form1" runat="server">    <script language="j...

Display image in image control?
i am trying to retrive the image from sqlserver 2005 and how to put this image in image control in a web application?  See Saving and Displaying Photos in SQL Server using ASP.NETIf this post was useful to you, please mark it as answer. Thank you!...

displaying image in image control
I am inserting the image from the image control in the sql server database. now i want to read the image from the databse and show that image in the image control. i am able to read the image in streams and i am not able it to assign it to image control.kindly help. Hi,have a look at this linkhttp://www.aspdotnetcodes.com/Insert_Images_Database.aspxThanks,  hai go through the links http://www.odetocode.com/Articles/172.aspxhttp://chiragrdarji.wordpress.com/2007/03/05/storing-and-retrieving-image-in-sql-server/ Regards,M.VenkatesanMy Blog : http://venkat-dotnetsamples.blog...

how to display messagebox when i am clicking add image and at the same time the image is changed to cancel image
hi to all  i have  aproblem  i am having a image called addnewuser when i am clicking that addnewuser i should get a message box saying that "are you sure u want to add new user " at the same time the image is change to  cancel when i click  that cancel  image i  should  get a confirmation messagbox "are you sure u want to  cancel" how can i tried  to write but when ia m writing this i am  getting the same messagebox what i am writting for addnewuser so please kindly  help me  even i am  sending my j...

display a custom image if no image exists
 Hi I currently  have something like the following: <asp:HyperLink ID="HyperLink" runat="server" ImageUrl='<%# Eval("filePath1") %>' NavigateUrl='<%# Eval("filePath1") %>' Visible='<%# !String.IsNullOrEmpty(Eval("filePath1","")) %>'></asp:HyperLink> it displays the image pulled back from the db or it displays nothing if it does not exist (sets visible to false)I would like it to display a custom image I have made instead of no image at a...

dont display image icon if image not there
i am displaying search results in DetailsView. my database have images, but not in all records. so if  there is no image path in the field  then image icon should not display on the page. either image should display on the page or no icon of image should display.   thanks for spending ur valuable time for me Conditionally showing an image, or other control: http://www.mikesdotnetting.com/Article.aspx?ArticleID=18Regards Mike [MVP - ASP/ASP.NET]My site How about something like this: <asp:detailsview> <fields> <asp:templatefield> <it...

Display image in image control from database?
Im looking for how to load an image in a database into an asp.net image control. I would like to be able to display images with assocated image captions in a page stored in a database. Samples I have found only deal with writing out the binary data directly into the page. Does anyone have a link on how to associate that image data in the database with an image control on the page? Have a look at this control in the control Gallery.  Should do what you want.JamesMy Blog: http://www.wintersfamily.plus.com/blogs/JamesWinters I found a few articles on this such as, http://blogs.ww...

How to display a jpg image in Image Control
I have Image control on a web form and i was a write a following code for displaying image in image control. but it does not display image in image control at runtime. Image1.ImageUrl = "c:\My Documents\IMG_0510.jpg" I got the solution just one change in code of replacing forward slash to backward slash Image1.ImageUrl = "c:/My Documents/IMG_0510.jpg"  I would like to suggest you that don't use the physical path for display image in image control. So you can use like that:-If you are using Runat = "server" control so you can use this one....

Web resources about - Displaying images in a DW (Getting image dimensions) - sybase.powerbuilder.general

List of mammals displaying homosexual behavior - Wikipedia, the free encyclopedia
For these mammals, there is documented evidence of homosexual behavior of one or more of the following kinds: sexual behavior , courtship , affection ...

Facebook Displaying Page Insights On Page Admins’ Personal Pages?
Some Facebook page administrators are seeing modules on their personal pages displaying page insights ad, campaign , and like totals for pages ...

Facebook Displaying Unread Messages from Pages in a New Updates Module
Facebook is displaying a new “Updates” sidebar module which shows some users unread messages sent to them by Pages. Users will see the Updates ...

Don Lemon Holds Up Sign Displaying the N-Word, Uncensored, on Air CNN Live - YouTube
Don Lemon Holds Up Sign Displaying the N-Word, Uncensored, on Air Lemon held up a Confederate flag first before holding up the sign. He asked, ...

Hazelwood coal mine fire: Morwell residents displaying symptoms similar to cigarette smokers, expert ...
An expert says some locals near Victoria's Hazelwood mine fire have symptoms similar to cigarette smokers.

Police accused of displaying fake G20 weapons
Toronto's top police officer misled the public by displaying fake weapons used in a medieval-themed role-playing game to help justify their actions ...

No charges for U.S. host for displaying high-capacity magazine on TV
NBC television journalist David Gregory won't face charges for displaying a high-capacity ammunition magazine on his "Meet the Press" news program ...

Jays' Escobar suspended three games for displaying slur
Toronto Blue Jays shortstop Yunel Escobar has been suspended three games for displaying a homophobic slur on his eye-black during a game on Saturday. ...

Google Play Store now displaying age-based ratings
We reported back in May that Google was adding age-based ratings to all apps in the Play Store as determined by the International Age Rating ...

Apple displaying Ferraris & other cars at WWDC hinting at CarPlay announcements
... 2014 Filed under: AAPL Company , iOS Continue reading more about AAPL Company and iOS at 9to5Mac . What do you think? Discuss "Apple displaying ...

Resources last updated: 2/18/2016 6:05:31 PM