473,804 Members | 3,855 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

embedded image?

Hi we have a piece of php based (i think) software that exports to an
rtf file, these files contain an image, this image makes the rtfs too
large...so the solution is to reduce the quality/resolution of the
image being used.

The image appears to be embedded in a variable that is in alone in its
own php file (i'm 99% sure of this because i have tried editing the
actual images that are visible to windows and this makes no difference
to the exported rtf and also the size of the php file is almost the
same as the exported rtf files)
The php file in question starts like this
<?
$rtf_image1 = "5cca52c0fb1534 00d

and ends like

000
";

?>

All thats in between are numbers and letters, about 1.5mb worth, so
can't post them all...this is perhaps just the raw code of the image
file? I have tried to take this code and save it as a jpg/gif/png but
doesn't seem to show up as an image.

So basically, how can i edit/replace this image?

TIA

Mar 20 '08
20 1842
sa************@ yahoo.co.uk wrote:
On 25 Mar, 17:02, Jerry Stuckle <jstuck...@attg lobal.netwrote:
>salmanjavah... @yahoo.co.uk wrote:
>>On Mar 23, 10:58 am, salmanjavah...@ yahoo.co.uk wrote:
On Mar 20, 11:16 am, Wiktor Walc <nore...@ckfind er.comwrote:
salmanjavah ...@yahoo.co.uk pisze:
>Hi we have a piece of php based (i think) software that exports to an
>rtf file, these files contain an image, this image makes the rtfs too
>large...
>The php file in question starts like this
><?
>$rtf_image 1 = "5cca52c0fb1534 00d
Try this function and save the result to a file:
<?php
$result = base64_decode($ rtf_image1);
?>
(take a look in the source code, perhaps it is used there, I just guess
that image has been encoded with base64_encode)
--
CKFinder :: ajax web file browserhttp://www.ckfinder.co m
have tried that function to no avail...what else could it be?- Hide quoted text -
- Show quoted text -
Basically what happens is it takes a while for the page to load, and
then it is just a blank page, have used the echo function to display
the variable decoded. it does display something when i cut down the
code though, is it possible that it can't handle the amount of code
there is?
What do you see when you display the page source in your browser? Is it
possible you're getting a timeout?

--
============== ====
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attg lobal.net
============== ====- Hide quoted text -

- Show quoted text -

the source code is completely blank
Then I suspect you have a syntax error in your code. Ensure you have
these in your php.ini file:

error_reporting =E_ALL
display_errors= on

That will display any errors you might have.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Mar 25 '08 #11
On 25 Mar, 21:39, Jerry Stuckle <jstuck...@attg lobal.netwrote:
salmanjavah...@ yahoo.co.uk wrote:
On 25 Mar, 17:02, Jerry Stuckle <jstuck...@attg lobal.netwrote:
salmanjavah...@ yahoo.co.uk wrote:
On Mar 23, 10:58 am, salmanjavah...@ yahoo.co.uk wrote:
On Mar 20, 11:16 am, Wiktor Walc <nore...@ckfind er.comwrote:
salmanjavah. ..@yahoo.co.uk pisze:
Hi we have a piece of php based (i think) software that exports to an
rtf file, these files contain an image, this image makes the rtfs too
large...
The php file in question starts like this
<?
$rtf_imag e1 = "5cca52c0fb1534 00d
Try this function and save the result to a file:
<?php
$result = base64_decode($ rtf_image1);
?>
(take a look in the source code, perhaps it is used there, I just guess
that image has been encoded with base64_encode)
--
CKFinder :: ajax web file browserhttp://www.ckfinder.co m
have tried that function to no avail...what else could it be?- Hide quoted text -
- Show quoted text -
Basically what happens is it takes a while for the page to load, and
then it is just a blank page, have used the echo function to display
the variable decoded. it does display something when i cut down the
code though, is it possible that it can't handle the amount of code
there is?
What do you see when you display the page source in your browser? *Isit
possible you're getting a timeout?
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===- Hide quoted text -
- Show quoted text -
the source code is completely blank

Then I suspect you have a syntax error in your code. *Ensure you have
these in your php.ini file:

error_reporting =E_ALL
display_errors= on

That will display any errors you might have.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===- Hide quoted text -

- Show quoted text -
it is currently set to
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
and
display_errors = on

but still nothing in the source code :(
Mar 25 '08 #12
sa************@ yahoo.co.uk wrote:
On 25 Mar, 21:39, Jerry Stuckle <jstuck...@attg lobal.netwrote:
>salmanjavah... @yahoo.co.uk wrote:
>>On 25 Mar, 17:02, Jerry Stuckle <jstuck...@attg lobal.netwrote:
salmanjavah. ..@yahoo.co.uk wrote:
On Mar 23, 10:58 am, salmanjavah...@ yahoo.co.uk wrote:
>On Mar 20, 11:16 am, Wiktor Walc <nore...@ckfind er.comwrote:
>>salmanjav ah...@yahoo.co. uk pisze:
>>>Hi we have a piece of php based (i think) software that exports to an
>>>rtf file, these files contain an image, this image makes the rtfs too
>>>large. ..
>>>The php file in question starts like this
>>><?
>>>$rtf_ima ge1 = "5cca52c0fb1534 00d
>>Try this function and save the result to a file:
>><?php
>>$result = base64_decode($ rtf_image1);
>>?>
>>(take a look in the source code, perhaps it is used there, I just guess
>>that image has been encoded with base64_encode)
>>--
>>CKFinde r :: ajax web file browserhttp://www.ckfinder.co m
>have tried that function to no avail...what else could it be?- Hide quoted text -
>- Show quoted text -
Basically what happens is it takes a while for the page to load, and
then it is just a blank page, have used the echo function to display
the variable decoded. it does display something when i cut down the
code though, is it possible that it can't handle the amount of code
there is?
What do you see when you display the page source in your browser? Is it
possible you're getting a timeout?
--
============ ======
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@at tglobal.net
============ ======- Hide quoted text -
- Show quoted text -
the source code is completely blank
Then I suspect you have a syntax error in your code. Ensure you have
these in your php.ini file:

error_reportin g=E_ALL
display_errors =on

That will display any errors you might have.

--
============== ====
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attg lobal.net
============== ====- Hide quoted text -

- Show quoted text -

it is currently set to
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
and
display_errors = on

but still nothing in the source code :(
I would check that. What does phpinfo() say?

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Mar 26 '08 #13
On 26 Mar, 02:02, Jerry Stuckle <jstuck...@attg lobal.netwrote:
salmanjavah...@ yahoo.co.uk wrote:
On 25 Mar, 21:39, Jerry Stuckle <jstuck...@attg lobal.netwrote:
salmanjavah...@ yahoo.co.uk wrote:
On 25 Mar, 17:02, Jerry Stuckle <jstuck...@attg lobal.netwrote:
salmanjavah.. .@yahoo.co.uk wrote:
On Mar 23, 10:58 am, salmanjavah...@ yahoo.co.uk wrote:
On Mar 20, 11:16 am, Wiktor Walc <nore...@ckfind er.comwrote:
>salmanjava h...@yahoo.co.u k pisze:
>>Hi we have a piece of php based (i think) software that exports to an
>>rtf file, these files contain an image, this image makes the rtfstoo
>>large.. .
>>The php file in question starts like this
>><?
>>$rtf_imag e1 = "5cca52c0fb1534 00d
>Try this function and save the result to a file:
><?php
>$result = base64_decode($ rtf_image1);
>?>
>(take a look in the source code, perhaps it is used there, I just guess
>that image has been encoded with base64_encode)
>--
>CKFinder :: ajax web file browserhttp://www.ckfinder.co m
have tried that function to no avail...what else could it be?- Hidequoted text -
- Show quoted text -
Basically what happens is it takes a while for the page to load, and
then it is just a blank page, have used the echo function to display
the variable decoded. it does display something when i cut down the
code though, is it possible that it can't handle the amount of code
there is?
What do you see when you display the page source in your browser? *Is it
possible you're getting a timeout?
--
============= =====
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@att global.net
============= =====- Hide quoted text -
- Show quoted text -
the source code is completely blank
Then I suspect you have a syntax error in your code. *Ensure you have
these in your php.ini file:
error_reporting =E_ALL
display_errors= on
That will display any errors you might have.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===- Hide quoted text -
- Show quoted text -
it is currently set to
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
and
display_errors = on
but still nothing in the source code :(

I would check that. *What does phpinfo() say?

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===- Hide quoted text -

- Show quoted text -

I have just had a closer look at the $rtf_image1 variable and there
are bits that are not so seemingly random, for instance
{\\nonshppict
{\pict
\picscalex16\pi cscaley16\piccr opl0\piccropr0\ piccropt0\piccr opb0\picw30771\ pich12144\picwg oal17445\pichgo al6885\wmetafil e8\bliptag-1510104784\blip upi96{\*
\blipuid a5fda1307ee8203 3d2d3fc13c6e4ef 09}

and

{\\nonshppict
{\pict
\picscalex100\p icscaley100\pic cropl0\piccropr 0\piccropt0\pic cropb0\picw2120 \pich2108\picwg oal1202\pichgoa l1195\wmetafile 8\bliptag155676 3328\blipupi200 {\*
\blipuid 5cca52c0fb15340 0d9ec103ffae2d7 3f}

appears within this variable

any ideas?
Apr 6 '08 #14
sa************@ yahoo.co.uk wrote:
On 26 Mar, 02:02, Jerry Stuckle <jstuck...@attg lobal.netwrote:
>salmanjavah... @yahoo.co.uk wrote:
>>On 25 Mar, 21:39, Jerry Stuckle <jstuck...@attg lobal.netwrote:
salmanjavah. ..@yahoo.co.uk wrote:
On 25 Mar, 17:02, Jerry Stuckle <jstuck...@attg lobal.netwrote:
>salmanjava h...@yahoo.co.u k wrote:
>>On Mar 23, 10:58 am, salmanjavah...@ yahoo.co.uk wrote:
>>>On Mar 20, 11:16 am, Wiktor Walc <nore...@ckfind er.comwrote:
>>>>salmanj avah...@yahoo.c o.uk pisze:
>>>>>Hi we have a piece of php based (i think) software that exports to an
>>>>>rtf file, these files contain an image, this image makes the rtfs too
>>>>>large. ..
>>>>>The php file in question starts like this
>>>>><?
>>>>>$rtf_i mage1 = "5cca52c0fb1534 00d
>>>>Try this function and save the result to a file:
>>>><?php
>>>>$resu lt = base64_decode($ rtf_image1);
>>>>?>
>>>>(take a look in the source code, perhaps it is used there, I just guess
>>>>that image has been encoded with base64_encode)
>>>>--
>>>>CKFinde r :: ajax web file browserhttp://www.ckfinder.co m
>>>have tried that function to no avail...what else could it be?- Hide quoted text -
>>>- Show quoted text -
>>Basical ly what happens is it takes a while for the page to load, and
>>then it is just a blank page, have used the echo function to display
>>the variable decoded. it does display something when i cut down the
>>code though, is it possible that it can't handle the amount of code
>>there is?
>What do you see when you display the page source in your browser? Is it
>possible you're getting a timeout?
>--
>========== ========
>Remove the "x" from my email address
>Jerry Stuckle
>JDS Computer Training Corp.
>jstuck...@ attglobal.net
>========== ========- Hide quoted text -
>- Show quoted text -
the source code is completely blank
Then I suspect you have a syntax error in your code. Ensure you have
these in your php.ini file:
error_report ing=E_ALL
display_erro rs=on
That will display any errors you might have.
--
============ ======
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@at tglobal.net
============ ======- Hide quoted text -
- Show quoted text -
it is currently set to
error_reporti ng = E_ALL & ~E_NOTICE & ~E_STRICT
and
display_error s = on
but still nothing in the source code :(
I would check that. What does phpinfo() say?

--
============== ====
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attg lobal.net
============== ====- Hide quoted text -

- Show quoted text -


I have just had a closer look at the $rtf_image1 variable and there
are bits that are not so seemingly random, for instance
{\\nonshppict
{\pict
\picscalex16\pi cscaley16\piccr opl0\piccropr0\ piccropt0\piccr opb0\picw30771\ pich12144\picwg oal17445\pichgo al6885\wmetafil e8\bliptag-1510104784\blip upi96{\*
\blipuid a5fda1307ee8203 3d2d3fc13c6e4ef 09}

and

{\\nonshppict
{\pict
\picscalex100\p icscaley100\pic cropl0\piccropr 0\piccropt0\pic cropb0\picw2120 \pich2108\picwg oal1202\pichgoa l1195\wmetafile 8\bliptag155676 3328\blipupi200 {\*
\blipuid 5cca52c0fb15340 0d9ec103ffae2d7 3f}

appears within this variable

any ideas?
Again - what does phpinfo say about your error settings?

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Apr 6 '08 #15
<comp.lang.ph p>
<Jerry Stuckle>
<Sun, 06 Apr 2008 11:13:45 -0400>
<dO************ *************** ***@comcast.com >
Again - what does phpinfo say about your error settings?
If you are going to quote 100 lines of text to give a one line reply -
do you think you could start to top post your replys .
--
www.krustov.co.uk
Apr 6 '08 #16
Krustov wrote:
<comp.lang.ph p>
<Jerry Stuckle>
<Sun, 06 Apr 2008 11:13:45 -0400>
<dO************ *************** ***@comcast.com >
>Again - what does phpinfo say about your error settings?

If you are going to quote 100 lines of text to give a one line reply -
do you think you could start to top post your replys .

And if you're going to give useless responses - just don't.

But then you wouldn't have anything to say.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Apr 6 '08 #17
Jerry Stuckle wrote:
>If you are going to quote 100 lines of text to give a one line reply -
do you think you could start to top post your replys .


And if you're going to give useless responses - just don't.

But then you wouldn't have anything to say.
It was a *good* advice. by cutting the quoted text just to what is
relevant, you are helping others to read your posts.

best regards
Piotr
Apr 6 '08 #18
fixed it!

i was looking too much into the php side of things, it wasn't encoded
at all. all the variable was was the code of the image section of the
rtf file.

So all i had to do was edit the rtf with a new image, work out which
bit of the rtf code was the image, and copy it over to the php file,
replacing the variable.
Thanks for the help everyone!
Apr 6 '08 #19
also i had to change the \nonshppict part, to \\nonshppict, I guess
because php ignores \ unless they are double
Apr 6 '08 #20

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

Similar topics

9
2131
by: yawnmoth | last post by:
i've written a php script that generates images dynamically, via the GD library. i now want to detect whether or not the image is embedded within a homepage, or is being viewed by itself. at first, i thought that whether or not HTTP_SERVER_VARS was set, that it would mean that the image was embedded, but that's not necessarily the case, as it will also be set if it's just linked to from the webpage. so, any ideas?
1
7496
by: Zeroeffect | last post by:
Hello! I have a database with alot of embedded images. The reason for having the images embedded is security. My problem is that it works fine on my computer, but not on my clients computer. He hasn't got Microsoft Photo Editor installed and because of that he cant view the images when doubleclicking on them in the table. He can still see the pictures in the formview but when he doubelclicks the images a error message shows up.
7
16738
by: Robert W. | last post by:
I think I'm going insane, but thought I'd check with you all first before I get myself commited! Here's a method I've built to retrieve an image: public static Image GetImage(string imageBaseName, ref int imageNum) { string fullName = ""; Bitmap image = null; Stream stream;
2
1372
by: elziko | last post by:
I'm trying to use an embedded image(bitmap) using the following code: imgDrag = New System.Drawing.Bitmap(GetType(QueryResultGrid).Assembly.GetManifestResourceS tream("Comp.Tech.QueryResultGrid.ResultsGridDrag.bmp")) Where QueryResultGrid is the class thats going to use the image, Comp.Tech.QueryResultGrid is the assembly name and ResultsGridDrag.bmp is the file name of the embedded resource. However, on runing this line I get:
8
4005
by: news.microsoft.com | last post by:
I have an icon that I can reference by the following: Dim im As System.Drawing.Image im = im.FromFile(lsapppath & "ChkMrk.ico") g_mainform.fg.SetCellImage(g_mainform.FG.Row, 5, im) The problem is that I do NOT want to reference this as "from file" - the icon is already embedded in the program, but I can't seem to find a way to convert my embedded icon to an image. Any help appreciated. TIA.
0
1305
by: Smokey Grindle | last post by:
I want to have an HTML email that displays an embedded image in the message... how can I use the embedded object collection of the mail definition object to do this? how do I reference the embedded image in an image tag in the message? thanks!
7
4444
by: Trapulo | last post by:
Hello, I need to send an email from vb.net. The body may be html encoded, and all images related to the html (<img src....>) may be embedded in the email content instead of refer to remote urls. I've tried a lot of solution, but I can only get a message with images embedded but no html, or message with html but no images embedded. What is the right way to have this goal? I have a dictionary with <image name, image content as byte...
8
2458
by: Fred* | last post by:
Hello, I'm using Visual C# 2005 Express. if I create a new "application windows" project and run it (F5), it works well. (an empty window is launched..) as soon as I set the build action to embedded resource, I can't run it anymore because I got an error on 'WindowsApplication1.Form1.Dispose(bool)'..
6
6489
by: LEM | last post by:
Hi, I use a Webbrowser component to display a page that has been generate dynamically from my C# program. This page contains some images that are displayed using HTML code like this: <img src="person.gif"> person.gif is an image that is located in my bin folder.
0
9706
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
9577
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10569
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
10315
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
10075
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...
0
9140
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7615
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
6847
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4295
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

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.