473,326 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Check Image is over another Image

Hello

is there a way to check if an image is over another Image ?

thanks

Mar 31 '06 #1
9 1374
Client side using JavaScript ?

Some more context may help...

--
Patrice

"Varangian" <of****@gmail.com> a écrit dans le message de news:
11**********************@i40g2000cwc.googlegroups. com...
Hello

is there a way to check if an image is over another Image ?

thanks

Mar 31 '06 #2
how though ? is there a way to check?

Mar 31 '06 #3
My first thought would be to say that it overlaps if both x and y ranges are
overlapped (in this case they share a common region).

Also the whole context may help. For example if you describe what you are
doing one could suggest a way to avoid it rahter than checking for it (for
example by computing server side absolute non overlapping positions or by
using HTML placement)...

--
Patrice

"Varangian" <of****@gmail.com> a écrit dans le message de news:
11**********************@e56g2000cwe.googlegroups. com...
how though ? is there a way to check?

Mar 31 '06 #4
the x and y range has a problem though .... it is for one point only...
remember an image is large and x and y takes care of one point of an
image.. the upper left corner.

what do you mean by the whole context?..... what is HTML placement?

Mar 31 '06 #5
Could you perhaps check the x and y of both images (top left) from the
container, and then compare both sets of images (width, length) from origin
x to see if any of the measurements exist within the same spatial range.

For example, if x of image 1 is 100, and x of image 2 is 120, and image 1 is
30 wide it overlaps image 2 by 10
--
Regards

John Timney
Microsoft MVP

"Varangian" <of****@gmail.com> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...
the x and y range has a problem though .... it is for one point only...
remember an image is large and x and y takes care of one point of an
image.. the upper left corner.

what do you mean by the whole context?..... what is HTML placement?

Mar 31 '06 #6
hmmm

so your saying if it overlaps in a positive value the image is over it ?

Mar 31 '06 #7
so it would seem

--
Regards

John Timney
Microsoft MVP

"Varangian" <of****@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
hmmm

so your saying if it overlaps in a positive value the image is over it ?

Apr 1 '06 #8
I was talking about a range i.e. each image has an upper left corner (x1,y1)
and a lower right corner (x2,y2)
If you have "A" and "B" images, you'll have to check if A.x1,A.x2 and
B.x1,B.x2 overlaps. The same for y. If both overlaps IMO it's that they
share a common region.

If you display images inside table cells for example, they won't overlap...

What I meant by the whole context is that IMO it's always worth to explain
what you actually trying to do.

Sometimes one ask how to do something particular because this is the
solution he thought about. But if he explains the whole problem (rather than
how to achieve the particular solution he found) someone else can suggest
another and possibly better solution.

--
Patrice

"Varangian" <of****@gmail.com> a écrit dans le message de news:
11**********************@e56g2000cwe.googlegroups. com...
the x and y range has a problem though .... it is for one point only...
remember an image is large and x and y takes care of one point of an
image.. the upper left corner.

what do you mean by the whole context?..... what is HTML placement?

Apr 3 '06 #9
thanks .. infact thats what I did and worked :D...... I was actually
asking more if there is a method approach to it (a ready built library
or method) rather a mathemtical approach.

the math approach works fine hehe ;)

Apr 5 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate...
2
by: Cynthia | last post by:
I'm looking for javascript code that when I mouse over a menu item will display a picture elsewhere on the page. I know it exists, but the ones I've found so far just swap out the menu item in...
3
by: Tom | last post by:
I have a picturebox on my VB.NET form. The picturebox size mode is set to stretched. I then load an image into that form and display it. As the user moves the mouse over the form, I want to get and...
2
by: Geoff | last post by:
Hi Previously I was able to check for an uploaded file to be a jpg or a gif by using the exif_imagetype() function. I had to change from hosting provider and the new one doesn't want to...
0
by: numbnutz | last post by:
Hi, I am currently working on an XML Gallery for my girlfriend's brother who is a photographer. I have created a flash front end template and am using an XML database to load the images and...
2
by: =?Utf-8?B?TWlrZSBPS0M=?= | last post by:
VB 2005 All developers face this issue; so I'm sure Microsoft was a solution for it. What is the built in method to check DBNull in a recordset field? NOT a typed dataset. I don't want to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.