12-20-2010
Quote:
Originally Posted by
photon
I am getting all the data as bytes in packets.
Of course you are. Anything chunk of data whatsoever can be represented as 8-bit bytes. But that doesn't mean you're getting
only one byte!
Quote:
What ways are there to wright data blocks of bytes?
You already know 2 different ways. The difference is that, instead of using them to write
1 byte, you use them to write more.
Do you actually
know that? Do you know your packets are even all the same size? You shouldn't have to guess -- something, somewhere in your code must know the size of the packet you received, but you're either not keeping that result or not using it...
Unfortunately we can't see your code from here. Please post it.
Quote:
Would this affect the JPEG image size, because all jpg files
have the same size, even when camera sends different size
images.
I certainly hope it would affect the jpeg image size, right now they're only going to be a tiny fraction of the size they should be.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm running a Sunblade 1500 with 2 XVR-100 video cards. I have Xinerama runing as well. Desktop is CDE. Can someone help me in converting Jpeg pictures so that I can use them as backdrops? Is there a way to make the picture come on both monitors instead of streaching it across both?
Thanks. (1 Reply)
Discussion started by: HSTheDuck
1 Replies
2. UNIX for Advanced & Expert Users
I was wondering what program can i use instead of mozilla to view a picture on a sun solaris system running SunOS 5.8.
To view a pic i'm currently doing it this way:
xterm -sb -fn screen-bold -g 60x30+0-0 -title '%s window - pls quit window upon completion ' -e mozilla file:///usr/sailing.JPG
... (4 Replies)
Discussion started by: wisher115
4 Replies
3. UNIX for Dummies Questions & Answers
I use gv or ggv to view a .pdf, or .ps file.
What will allow me to see a jpeg file?
If it matters, I'm using xterm on a PowerBook G4. (0 Replies)
Discussion started by: dsstamps
0 Replies
4. IP Networking
I trying to send and receive OSPF packets. I am using RAW Sockets(socket(AF_INET, SOCK_RAW, IPPROTO_OSPF)) to do this.
I am successfully able to send an OSPF Hello packet however I am not able to receive a OSPF packet if I have not sent an OSPF packet earlier on the RAW SOCKET.
Scenario:
... (3 Replies)
Discussion started by: cosmic_egg
3 Replies
5. UNIX Desktop Questions & Answers
Hi to all
Like in the subject, i got the problem with camera ID 0c45:613b Microdia Win2 PC Camera under Ubuntu. When i plug in camera to USB, Ubuntu put in sn9c102 module, but on this site Linux Kernel Driver Database: CONFIG_USB_GSPCA_SONIXJ: SONIX JPEG USB Camera Driver is information that... (0 Replies)
Discussion started by: m0z4rt
0 Replies
6. Programming
Hi,
how to insert JPEG on each side of the cube using OpenGL in C language..
i have a program for cube..
guide me ,,,
any answer will valuable.. (3 Replies)
Discussion started by: Ravikishore
3 Replies
7. Shell Programming and Scripting
Hello!
I'm desperately trying to write a makefile that converts and scales jpeg files to png files in subdirectories
I want to use netpbm, so I just need the commands:
anytopnm
pnmscale
pnmtopng
For various reasons i want to use a makefile. This is the first time i use the make tool... (1 Reply)
Discussion started by: henningbaer
1 Replies
8. Programming
Hello
I try to send DHCP RENEW packets to the network and receive the responses. I broadcast the packet and I can see that it's successfully sent using Wireshark. But I have difficulties receiving the responses.I use packet sockets to catch the packets. I can see that there are responses to my... (0 Replies)
Discussion started by: xyzt
0 Replies
9. Shell Programming and Scripting
Hi guys im currently trying to write a script which includes rename files and this is the part where i fail
i have a list of files eg
and i want to rename them so
any help really would be appreciated
Cheers dunryc (7 Replies)
Discussion started by: dunryc
7 Replies
10. AIX
(5 Replies)
Discussion started by: Vishal_dba
5 Replies
LEARN ABOUT DEBIAN
wrjpgcom
WRJPGCOM(1) General Commands Manual WRJPGCOM(1)
NAME
wrjpgcom - insert text comments into a JPEG file
SYNOPSIS
wrjpgcom [ -replace ] [ -comment text ] [ -cfile name ] [ filename ]
DESCRIPTION
wrjpgcom reads the named JPEG/JFIF file, or the standard input if no file is named, and generates a new JPEG/JFIF file on standard output.
A comment block is added to the file.
The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. Although the standard doesn't actually define what COM blocks
are for, they are widely used to hold user-supplied text strings. This lets you add annotations, titles, index terms, etc to your JPEG
files, and later retrieve them as text. COM blocks do not interfere with the image stored in the JPEG file. The maximum size of a COM
block is 64K, but you can have as many of them as you like in one JPEG file.
wrjpgcom adds a COM block, containing text you provide, to a JPEG file. Ordinarily, the COM block is added after any existing COM blocks;
but you can delete the old COM blocks if you wish.
OPTIONS
Switch names may be abbreviated, and are not case sensitive.
-replace
Delete any existing COM blocks from the file.
-comment text
Supply text for new COM block on command line.
-cfile name
Read text for new COM block from named file.
If you have only one line of comment text to add, you can provide it on the command line with -comment. The comment text must be sur-
rounded with quotes so that it is treated as a single argument. Longer comments can be read from a text file.
If you give neither -comment nor -cfile, then wrjpgcom will read the comment text from standard input. (In this case an input image file
name MUST be supplied, so that the source JPEG file comes from somewhere else.) You can enter multiple lines, up to 64KB worth. Type an
end-of-file indicator (usually control-D) to terminate the comment text entry.
wrjpgcom will not add a COM block if the provided comment string is empty. Therefore -replace -comment "" can be used to delete all COM
blocks from a file.
EXAMPLES
Add a short comment to in.jpg, producing out.jpg:
wrjpgcom -c "View of my back yard" in.jpg > out.jpg
Attach a long comment previously stored in comment.txt:
wrjpgcom in.jpg < comment.txt > out.jpg
or equivalently
wrjpgcom -cfile comment.txt < in.jpg > out.jpg
SEE ALSO
cjpeg(1), djpeg(1), jpegtran(1), rdjpgcom(1)
AUTHOR
Independent JPEG Group
15 June 1995 WRJPGCOM(1)