473,799 Members | 2,941 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

question regarding image processing

DP
Hi,

I'm not sure if this is the right group to ask. I am developing a
small image library and I don't know how to hide the actual path to
the image. So I go to the stock photo library websites to see how they
hide their images. This is what I see from gettyimages.com

<img src="http://cache2.asset-cache.net/xc/200186170-001.jpg?
v=1&amp;c=NewsM aker&amp;k=2&am p;d=1EF4EE1EFB3 A2CD3E55FD76681 43826B10621193D B58D674"
id="ctl12_ctlCo mp_imgThumb" class="thumbHei ght">

Can someone please explain why there are parameters after the ".jpg",
which is not an executable file? I've got the link by right-click and
view image properties. However, if I just copy the link, and paste
into a new window, I won't see the image.

Any one knows what technique is this?

Thank you.
DP.
Jun 2 '08 #1
21 1574
..oO(DP)
>I'm not sure if this is the right group to ask. I am developing a
small image library and I don't know how to hide the actual path to
the image. So I go to the stock photo library websites to see how they
hide their images. This is what I see from gettyimages.com

<img src="http://cache2.asset-cache.net/xc/200186170-001.jpg?
v=1&amp;c=News Maker&amp;k=2&a mp;d=1EF4EE1EFB 3A2CD3E55FD7668 143826B10621193 DB58D674"
id="ctl12_ctlC omp_imgThumb" class="thumbHei ght">

Can someone please explain why there are parameters after the ".jpg",
which is not an executable file? I've got the link by right-click and
view image properties. However, if I just copy the link, and paste
into a new window, I won't see the image.
Simple copy & paste won't work, since the link contains character
references (&amp;), which are required for HTML. Try this one to get the
image:

http://cache2.asset-cache.net/xc/200...621193DB58D674
>Any one knows what technique is this?
Just because you see a .jpg in the URL doesn't necessarily mean it is an
image. It can be anything else, in this case it could be a script that
returns an image based on the passed parameters.

Remember: a URL is just a string, nothing more. Things like "directory"
or "file extension" don't have a real meaning there. It's completely up
to server to decide what to do with something like ".jpg" at the end.

Micha
Jun 2 '08 #2
On 20 May, 23:47, DP <ldpha...@gmail .comwrote:
Hi,

I'm not sure if this is the right group to ask. I am developing a
small image library and I don't know how to hide the actual path to
the image. So I go to the stock photo library websites to see how they
hide their images. This is what I see from gettyimages.com
I'm not sure what you're after doing here. Hiding the path to an image
is not the same thing as hiding an image. If you hide an image, no one
can see it. If you allow someone to see it (on their browser), they
already have the image on their machine, in which case there is no
point in hiding the "path". I sometimes store images in a database
table, so there is no "path" as such.

If you want people to be able to see your images on their browser but
not to be able to keep a copy of them, forget it. There was a long
discussion about this recently. The bottom line is that the only thing
you can do to stop folks having a useful copy on their machine is to
put a watermark on the pictures.
Jun 2 '08 #3
DP
Thanks Michael & Captain. I know that Apache httpd.conf can be set to
execute any extension (I just know the fact). I just don't know that
they use what technique to return the image. I have a few assumptions,
but don't know which one is best:

1. the '.jpg' is an executable script, and it reads the image data
from original image file in file system, adds watermark, and outputs.
Or it can read data from watermarked image (watermarked image is
created from upload time). Then what happens if I need to display 50
images in one page? the script only processes one by one.

2. Images (and maybe watermarked images & thumbnails) are stored in
database. The script just returns data. I don't like this approach
because if I have hundreds of thousands of images, database is
probably not a good choice (from some discussions about storing images
in db vs. file system)

Jun 2 '08 #4
NC
On May 20, 4:47 pm, DP <ldpha...@gmail .comwrote:
>
I'm not sure if this is the right group to ask. I am developing a
small image library and I don't know how to hide the actual path to
the image. So I go to the stock photo library websites to see how they
hide their images. This is what I see from gettyimages.com

<img src="http://cache2.asset-cache.net/xc/200186170-001.jpg?
v=1&amp;c=NewsM aker&amp;k=2&am p;d=1EF4EE1EFB3 A2CD3E55FD76681 43826B10621193D B58D674"
id="ctl12_ctlCo mp_imgThumb" class="thumbHei ght">

Can someone please explain why there are parameters after the ".jpg",
which is not an executable file?
Who knows... Maybe the parameters are just for logging and have no
use in
the actual application. Maybe the server is configure to rewrite
URLs...
I just copy the link, and paste into a new window, I won't see the image.

Any one knows what technique is this?
There is no technique. Try replacing "&amp;" with "&":

http://cache2.asset-cache.net/xc/200...621193DB58D674

The file is perfectly visible...

Cheers,
NC
Jun 2 '08 #5
..oO(DP)
>Thanks Michael & Captain. I know that Apache httpd.conf can be set to
execute any extension (I just know the fact). I just don't know that
they use what technique to return the image. I have a few assumptions,
but don't know which one is best:

1. the '.jpg' is an executable script, and it reads the image data
from original image file in file system, adds watermark, and outputs.
Or it can read data from watermarked image (watermarked image is
created from upload time). Then what happens if I need to display 50
images in one page? the script only processes one by one.
Each image request is independent from each other and will start another
instance of the script on the server. In theory 50 requests would invoke
the same script 50 times, but in practice this won't happen because of
some default limits each web server has. Usually at most 2 or 4 requests
from the same client to the same host are answered in parallel, all
others are delayed. The same happens with static files as well.
>2. Images (and maybe watermarked images & thumbnails) are stored in
database. The script just returns data. I don't like this approach
because if I have hundreds of thousands of images, database is
probably not a good choice (from some discussions about storing images
in db vs. file system)
The real issue will be the same as with #1: You have to call a script
for each image. That's the main impact to the overall site performance.
Whether the images are stored on disk or in a DB is more a question of
personal preference, although DB storage may slow things down even more
in such a case (50 script calls, 50 DB connections, 50 data transfers
from the DB to the script).

Micha
Jun 2 '08 #6
DP escribió:
1. the '.jpg' is an executable script
Actually, you have no way to find out where the URL points to. With
modules like Apache's mod_rewrite you can make
http://example.com/foo/bar.jpg?a=1&b=1 point to
http://example.com/scripts/do-fancy-stuff.php?x=2 and it'll be
completely invisible to site visitors.

Then what happens if I need to display 50 images in one page? the script only processes one by one.
That's true even with regular JPEG files: one file, one picture. God
bless caching, queueing and multitasking ;-)

2. Images (and maybe watermarked images & thumbnails) are stored in
database. The script just returns data. I don't like this approach
because if I have hundreds of thousands of images, database is
probably not a good choice (from some discussions about storing images
in db vs. file system)
Some guys adore storing binary data in databases but of course that's a
good old discussion. I particularly find no benefits in it (you can't do
searches like "WHERE category_id=20 AND picture PORTRAITS A 'black
cat'") and it add an annoying overhead in all related tasks.
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor al baño María: http://www.demogracia.com
--
Jun 2 '08 #7
Michael Fesser wrote:
.oO(DP)
>Thanks Michael & Captain. I know that Apache httpd.conf can be set to
execute any extension (I just know the fact). I just don't know that
they use what technique to return the image. I have a few assumptions,
but don't know which one is best:

1. the '.jpg' is an executable script, and it reads the image data
from original image file in file system, adds watermark, and outputs.
Or it can read data from watermarked image (watermarked image is
created from upload time). Then what happens if I need to display 50
images in one page? the script only processes one by one.

Each image request is independent from each other and will start another
instance of the script on the server. In theory 50 requests would invoke
the same script 50 times, but in practice this won't happen because of
some default limits each web server has. Usually at most 2 or 4 requests
from the same client to the same host are answered in parallel, all
others are delayed. The same happens with static files as well.
>2. Images (and maybe watermarked images & thumbnails) are stored in
database. The script just returns data. I don't like this approach
because if I have hundreds of thousands of images, database is
probably not a good choice (from some discussions about storing images
in db vs. file system)

The real issue will be the same as with #1: You have to call a script
for each image. That's the main impact to the overall site performance.
Whether the images are stored on disk or in a DB is more a question of
personal preference, although DB storage may slow things down even more
in such a case (50 script calls, 50 DB connections, 50 data transfers
from the DB to the script).

Micha
If you have a large number of images, a database is often faster than
the file system. Databases can easily handle 100K images; file systems
not so much.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Jun 2 '08 #8
Álvaro G. Vicario wrote:
DP escribió:
>1. the '.jpg' is an executable script

Actually, you have no way to find out where the URL points to. With
modules like Apache's mod_rewrite you can make
http://example.com/foo/bar.jpg?a=1&b=1 point to
http://example.com/scripts/do-fancy-stuff.php?x=2 and it'll be
completely invisible to site visitors.

>Then what happens if I need to display 50 images in one page? the
script only processes one by one.

That's true even with regular JPEG files: one file, one picture. God
bless caching, queueing and multitasking ;-)

>2. Images (and maybe watermarked images & thumbnails) are stored in
database. The script just returns data. I don't like this approach
because if I have hundreds of thousands of images, database is
probably not a good choice (from some discussions about storing images
in db vs. file system)

Some guys adore storing binary data in databases but of course that's a
good old discussion. I particularly find no benefits in it (you can't do
searches like "WHERE category_id=20 AND picture PORTRAITS A 'black
cat'") and it add an annoying overhead in all related tasks.

The ability to search is not the only reason to store things in
databases. And if you have hundreds of thousands of images, a database
can be more efficient.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Jun 2 '08 #9
Jerry Stuckle escribió:
If you have a large number of images, a database is often faster than
the file system. Databases can easily handle 100K images; file systems
not so much.
If you mean "in the same directory", you're absolutely right.
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor al baño María: http://www.demogracia.com
--
Jun 2 '08 #10

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

Similar topics

1
5686
by: jasonshohet | last post by:
I read recently that: "if a before-image was made before an interruption in database processing, you use the before-image dump & simply begin processing again from just before the last transaction. Any checkpoints are irrelevant." I'm not a dba here, so bear with me... What I don't understand is, why are checkpoints irrelevant when you did a before image dump? Why not begin from the last checkpoint? Probably part of my problem is...
5
1628
by: Sean Berry | last post by:
I have an online store that a customer needs customized by having notes for each product. I have added a javascript function that sends a session id, unique product id and some user-defined notes to a script using XMLHttpRequest. The values get there fine and get stored in a database. Upon checkout (on the checkout page) I now want to pull all of the data back from the database and display it. I don't need to display the notes in...
29
3196
by: Mainlander | last post by:
An ISP I belong to uses Majordomo for their mailing list system. I'd like to encourage them to move to a system that uses a database, preferably psql which they already run on their server. Anything out there in Php?
7
1592
by: Fernando Cacciola | last post by:
Hi, I'm terribly new at C# (come from C++ land). I'm making some benchmarks to see the effect of different coding styles, and I run across a situation that strikes me as pretty odd. For my image processing code I would like to use low-level "Iterators", as I would in C++, so I have a struct of the form: public unsafe struct Col { public Col ( byte* ptr ) { mPtr = ptr ; }
5
1800
by: archana | last post by:
Hi all, I am using timer to do some functionality on user specified time. I am using system.timers.timer class and its timer to do this functionality. What i am doing is i set autoreset to false as i want to start processing only on user specified time. I am setting interval as difference between user sepcified time and current time. And when that elapsed event occured i am again setting
10
5743
by: Enrique Cruiz | last post by:
Hello all, I am currently implementing a fairly simple algorithm. It scans a grayscale image, and computes a pixel's new value as a function of its original value. Two passes are made, first horizontally and second vertically. The problem I have is that the vertical pass is 3 to 4 times slower than the horizontal, although the code is _exactly_ the same in both cases?! The code itself is very simple. There are 2 loops to scan through...
2
1394
by: Dave.Sun.Moon | last post by:
Dear all, I am not a professional programmer. In stead, I am using C++ mostly for my research work. My knowledge of C++ is only good enough for my computation. I really don't use the advanced feature of C++ very much (e.g. virtual functions, templates, etc. ). Recently, I have to work on some image processing problems. My first thought is to use C++ instead of Matlab, However, I don't want to reinvent the wheel, to rewrite all the...
0
2037
by: tavares | last post by:
(Our apologies for cross-posting. We appreciate if you kindly distribute this information by your co- workers and colleagues.) *************************************************************************** Symposium “Image Processing and Data Visualization” 2nd South-East European Conference on Computational Mechanics (SEECCM 2009) Island of Rhodes, Greece, 22-24 June 2009
5
1575
by: Christian Schlemmer | last post by:
Hi, in a webapplication, after a submit a page is called which is processing images uploaded by the user. currently after submit a status bar will be visible (the page for the image processing runs in an iframe) and after image processing the page makes an redirect. if there are many images, the processing needs some time and if the user is closing the browser the processing will be interrupted. now i would like to source out the...
0
9686
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10475
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10222
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10026
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.