473,431 Members | 1,650 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,431 software developers and data experts.

merging 3 layers

A while back I researched and wrote a script that uses gd to make merge
an arrow on a compass to show wind direction, and another on a
speedometer to show wind speed, now I'd like to enhance these "gauges"
even more on the wind speedometer, I'd like to show high and low and
possibly average, and on the direction I'd like to put the prevailing
wind direction.

My weather station can put out the data, but my limitation is I don't
find how to merge another layer onto the image that I am merging to.

how it works now, is I get the background image, use an array of the
direction or wind speed and then from the array look up the position
and rotaion to merge the arrow on to the background and show the final
image. This is called in the html page like this img
src="speed.php?hispeed=15"
so the speed.php takes the hispeed= and makes the image that is asked
for.

Do I have to write out the file and then call it again to merge the 3rd
layer? If I do that do I have to specify a location to save the
temporary file to?

Does anyone have an example of this?

here is the page that uses the script that I put together.
http://www.qffinc.com/weather/dweather.php

I can provide the files also if needed.

Nov 18 '06 #1
2 1558
Message-ID: <11**********************@b28g2000cwb.googlegroups .comfrom
ti*****@gmail.com contained the following:
>A while back I researched and wrote a script that uses gd to make merge
an arrow on a compass to show wind direction, and another on a
speedometer to show wind speed, now I'd like to enhance these "gauges"
even more on the wind speedometer, I'd like to show high and low and
possibly average, and on the direction I'd like to put the prevailing
wind direction.
Seems a wasteful use of GD where the number of images required is fairly
small. Even with one degree accuracy you are only talking 360 images.
Much easier to create them and then reference them from the filesystem.
Or do as you are doing now and save the image created and check if it
exists before making a new one.

The other information you want to add seem like just plain text, so I'd
add it with html and CSS.

If you insist on creating all images on the fly then to avoid saving and
doing the merge twice you'll have to look at the code that produces the
merge and add the second merge before the final output to .jpg
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Nov 18 '06 #2
The additional information now is text because I didn't find a way to
merge the additional arrows, it is just a stop gap, and on the
directional arrows I'm only doing 16 directions, not all 360 degrees,
but when I figure out how to add more layers then I'll want to add the
last 3 directions and a prevailing direction, so I don't want to be
limited. Besides it isn't as if the machine is working hard on anything
else it does.

But I like the idea, that if the same combination is asked for again
that it can just read the image from the drive and display it rather
than regenerate it. Do you have sample code that can do that?


Geoff Berrow wrote:
Message-ID: <11**********************@b28g2000cwb.googlegroups .comfrom
ti*****@gmail.com contained the following:
A while back I researched and wrote a script that uses gd to make merge
an arrow on a compass to show wind direction, and another on a
speedometer to show wind speed, now I'd like to enhance these "gauges"
even more on the wind speedometer, I'd like to show high and low and
possibly average, and on the direction I'd like to put the prevailing
wind direction.

Seems a wasteful use of GD where the number of images required is fairly
small. Even with one degree accuracy you are only talking 360 images.
Much easier to create them and then reference them from the filesystem.
Or do as you are doing now and save the image created and check if it
exists before making a new one.

The other information you want to add seem like just plain text, so I'd
add it with html and CSS.

If you insist on creating all images on the fly then to avoid saving and
doing the merge twice you'll have to look at the code that produces the
merge and add the second merge before the final output to .jpg
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Nov 18 '06 #3

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

Similar topics

1
by: Lizzy | last post by:
I have an internet application which has a progress bar show whenever the customer is requesting data from the server. This progress bar is coded to work in both Netscape 4.75 and above and IE 5.0...
6
by: David List | last post by:
I'm having a problem using different properties of the document object in the example javascripts in my textbook with browsers that identify themselves as using the Mozilla engine. One example of...
3
by: Patrick | last post by:
I have got 2 XML documents, both of which conform to the same XSD Schema, which define possible optional elements. The 2 XML documents contain 2 disjoint set of XML elements. What is the best,...
1
by: svdh | last post by:
I have posed a question last saturday and have advanced alot in the meantime. But I am still not there Problem is that I try to merging various fields from various tables in one document in Word...
2
by: teresaalmond | last post by:
I routinely have to qry several databases and combine the records for a mailing list. In all of the tables the fiedl names are different. For example: FName First name and FirstName Right not I...
2
by: Dave Taylor | last post by:
Is there a decent explanation of how menu merging with MDI forms work in VB.NET? I've read through the online help and it still seems that whenever I change menus around or whatever, it breaks...
5
by: Burt | last post by:
There's an architect at my 200 person company that advocates having many layers in all my C# apps. He wants web services, use case handlers, facade layers, data gateways, etc. When I ask why all...
1
by: Grimm | last post by:
I am developing an internalk inteface that integrates alot of seperate tools into one interface. The current version uses one Iframe inside a div layer for positioning. Currently the seperate web...
3
by: toby.k.webb | last post by:
Hi all, I have two images that I would like to merge together similar to a watermark (one becomes semi-transparent). Is there a way to do this in vb.net? Thanks.
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.