Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

PHP question - image manipulation

LEGEND ,
Feb 12, 2007 Feb 12, 2007
I have borrowed a page from a site I built last year that allows one to
upload images, and resize them on the fly. It works really well -

http://www.wildimages.biz/new-image-orig.php

Its code is here -

http://www.wildimages.biz/new-image-orig.txt

Now - I want this page to also automatically watermark the images after they
have been resized, so I built this one by just adding the image merge code -

http://www.wildimages.biz/new-image.php

Its code is here -

http://www.wildimages.biz/new-image.txt

But - it's curious, as the new page just writes the image to the page, and
then ends without completing the page. I suppose it has something to do
with the watermarking code I am using, but I'm not sure where. Can someone
kind please take a look for me?

Thanks!


--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================



TOPICS
Server side applications
567
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 12, 2007 Feb 12, 2007
On 12 Feb 2007 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:

> http://www.wildimages.biz/new-image.txt

404

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 12, 2007 Feb 12, 2007
Damn.

I have borrowed a page from a site I built last year that allows one to
upload images, and resize them on the fly. It works really well -

http://www.wildimages.biz/uploads/new-image-orig.php

Its code is here -

http://www.wildimages.biz/uploads/new-image-orig.txt

Now - I want this page to also automatically watermark the images after they
have been resized, so I built this one by just adding the image merge code -

http://www.wildimages.biz/uploads/new-image.php

Its code is here -

http://www.wildimages.biz/uploads/new-image.txt



--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Joe Makowiec" <makowiec@invalid.invalid> wrote in message
news:Xns98D5742CFF5B0makowiecatnycapdotrE@216.104.212.96...
> On 12 Feb 2007 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:
>
>> http://www.wildimages.biz/new-image.txt
>
> 404
>
> --
> Joe Makowiec
> http://makowiec.net/
> Email: http://makowiec.net/email.php


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 12, 2007 Feb 12, 2007
I think the problem is the way that watermarking routine ends with the
header assignment. If I remove it completely, I get the images without a
watermark. If I leave it in, the page acts as if it's just browsing
directly to an image file, and ignores the rest of the markup....

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
news:eqq4ja$1es$1@forums.macromedia.com...
> Damn.
>
> I have borrowed a page from a site I built last year that allows one to
> upload images, and resize them on the fly. It works really well -
>
> http://www.wildimages.biz/uploads/new-image-orig.php
>
> Its code is here -
>
> http://www.wildimages.biz/uploads/new-image-orig.txt
>
> Now - I want this page to also automatically watermark the images after
> they
> have been resized, so I built this one by just adding the image merge
> code -
>
> http://www.wildimages.biz/uploads/new-image.php
>
> Its code is here -
>
> http://www.wildimages.biz/uploads/new-image.txt
>
>
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
> http://www.dreamweavermx-templates.com - Template Triage!
> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
> ==================
>
>
> "Joe Makowiec" <makowiec@invalid.invalid> wrote in message
> news:Xns98D5742CFF5B0makowiecatnycapdotrE@216.104.212.96...
>> On 12 Feb 2007 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:
>>
>>> http://www.wildimages.biz/new-image.txt
>>
>> 404
>>
>> --
>> Joe Makowiec
>> http://makowiec.net/
>> Email: http://makowiec.net/email.php
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 12, 2007 Feb 12, 2007
Got it. My problem was that I wasn't saving the newly watermarked image
back onto the source image. Yippee!

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
news:eqqke0$ka7$1@forums.macromedia.com...
>I think the problem is the way that watermarking routine ends with the
>header assignment. If I remove it completely, I get the images without a
>watermark. If I leave it in, the page acts as if it's just browsing
>directly to an image file, and ignores the rest of the markup....
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
> http://www.dreamweavermx-templates.com - Template Triage!
> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
> ==================
>
>
> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
> news:eqq4ja$1es$1@forums.macromedia.com...
>> Damn.
>>
>> I have borrowed a page from a site I built last year that allows one to
>> upload images, and resize them on the fly. It works really well -
>>
>> http://www.wildimages.biz/uploads/new-image-orig.php
>>
>> Its code is here -
>>
>> http://www.wildimages.biz/uploads/new-image-orig.txt
>>
>> Now - I want this page to also automatically watermark the images after
>> they
>> have been resized, so I built this one by just adding the image merge
>> code -
>>
>> http://www.wildimages.biz/uploads/new-image.php
>>
>> Its code is here -
>>
>> http://www.wildimages.biz/uploads/new-image.txt
>>
>>
>>
>> --
>> Murray --- ICQ 71997575
>> Adobe Community Expert
>> (If you *MUST* email me, don't LAUGH when you do so!)
>> ==================
>> http://www.dreamweavermx-templates.com - Template Triage!
>> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
>> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
>> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
>> ==================
>>
>>
>> "Joe Makowiec" <makowiec@invalid.invalid> wrote in message
>> news:Xns98D5742CFF5B0makowiecatnycapdotrE@216.104.212.96...
>>> On 12 Feb 2007 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:
>>>
>>>> http://www.wildimages.biz/new-image.txt
>>>
>>> 404
>>>
>>> --
>>> Joe Makowiec
>>> http://makowiec.net/
>>> Email: http://makowiec.net/email.php
>>
>>
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 12, 2007 Feb 12, 2007
On Mon, 12 Feb 2007 15:58:45 -0500, "Murray *ACE*"
<forums@HAHAgreat-web-sights.com> wrote:

>I think the problem is the way that watermarking routine ends with the
>header assignment. If I remove it completely, I get the images without a
>watermark. If I leave it in, the page acts as if it's just browsing
>directly to an image file, and ignores the rest of the markup....


The watermarking function is designed to output the image directly to
the browser, not to a file. Which is it you want to do, write the
watermark into the resized image file, or generate the watermark on the
fly when the image is displayed?

Gary
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 12, 2007 Feb 12, 2007
I don't really care - how would I do it only on display then using that
code?

Put the imagejpg call down in the body where I want to display the image?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Gary White" <gary@apptools.com> wrote in message
news:2gq1t2d3n10cm3fck81fd1dauc7utjams4@4ax.com...
> On Mon, 12 Feb 2007 15:58:45 -0500, "Murray *ACE*"
> <forums@HAHAgreat-web-sights.com> wrote:
>
>>I think the problem is the way that watermarking routine ends with the
>>header assignment. If I remove it completely, I get the images without a
>>watermark. If I leave it in, the page acts as if it's just browsing
>>directly to an image file, and ignores the rest of the markup....
>
>
> The watermarking function is designed to output the image directly to
> the browser, not to a file. Which is it you want to do, write the
> watermark into the resized image file, or generate the watermark on the
> fly when the image is displayed?
>
> Gary


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 12, 2007 Feb 12, 2007
On Mon, 12 Feb 2007 17:51:28 -0500, "Murray *ACE*"
<forums@HAHAgreat-web-sights.com> wrote:

>I don't really care - how would I do it only on display then using that
>code?
>
>Put the imagejpg call down in the body where I want to display the image?

Nope. You'd put that in a separate file and use that file name with a
param to identify the image you want to display in the src attribute of
the <img> tag. Say you saved it as getimg.php and you wanted to display
picture.jpg:

<img src="getimg.php?pic=picture.jpg" ...

In getimg.php, you'd need to change:

$sourcefile = $name;

To:

$sourcefile = $_GET['pic'];

Gary
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 13, 2007 Feb 13, 2007
I want to display it on the same page.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Gary White" <gary@apptools.com> wrote in message
news:thj2t2pg6mlgrej8cldlobqhdd1dlhlejk@4ax.com...
> On Mon, 12 Feb 2007 17:51:28 -0500, "Murray *ACE*"
> <forums@HAHAgreat-web-sights.com> wrote:
>
>>I don't really care - how would I do it only on display then using that
>>code?
>>
>>Put the imagejpg call down in the body where I want to display the image?
>
> Nope. You'd put that in a separate file and use that file name with a
> param to identify the image you want to display in the src attribute of
> the <img> tag. Say you saved it as getimg.php and you wanted to display
> picture.jpg:
>
> <img src="getimg.php?pic=picture.jpg" ...
>
> In getimg.php, you'd need to change:
>
> $sourcefile = $name;
>
> To:
>
> $sourcefile = $_GET['pic'];
>
> Gary


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 13, 2007 Feb 13, 2007
On Tue, 13 Feb 2007 11:22:26 -0500, "Murray *ACE*"
<forums@HAHAgreat-web-sights.com> wrote:

>I want to display it on the same page.

I understand that. It's just that the code that would do the
watermarking on the fly would have to be in an external file.

Gary
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 13, 2007 Feb 13, 2007
LATEST
Ahh. Kimosabe....

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Gary White" <gary@apptools.com> wrote in message
news:lhs3t29u7d5jtbf0i9i2ui7lf3r3gok5au@4ax.com...
> On Tue, 13 Feb 2007 11:22:26 -0500, "Murray *ACE*"
> <forums@HAHAgreat-web-sights.com> wrote:
>
>>I want to display it on the same page.
>
> I understand that. It's just that the code that would do the
> watermarking on the fly would have to be in an external file.
>
> Gary


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines