I have an image (a photo) in a variable (obtained from a MySQL database), eg. $ary[4]. I wish to display it in my Perl CGI script. My question is, th normal image tag ie. <IMG> takes a SRC parameter of a *file*, whereas I just want to PRINT the image in the variable.
But the problem is that this file never gets saved to /var/upload directory (I changed php.ini file, so that uploaded files should be saved into /var/upload. I tried /var/tmp as well, but it's the same). Here are also the permissions of this dir:
BTW, I use Mandriva 2010 64 bit distribution. I spent last two days searching for solution on internet forums, asking people and made absolutely no progress. is it possible to debug what is happening with the supposedly uploaded file? I mean any logs, where I could find trace, what's going wrong? I tried to check /var/log/httpd and files in there, but no success either...
I have inherited a wordpress theme with a folder of images that I think are no longer being used. I wanted to find the orphaned images using grep, so I wrote this script:
Code: #!/bin/bash echo $PWD for i in *.*; do cd ..
[Code].....
Its seems like I got some false positives out of it, but it worked pretty ok. I guess. :| Of course, it is not checking for images in the content of the database.
Orphan finding has to be a wheel that is already invented.
I am building a pipeline for image processing. I would like to be able to take the png images in a folder and pass them to clusterImage.pl once that is done I would like to then pass the outputted file to seperateObjects.pl the outputted file is of the same name but has kmeansOutput.all.matrix attached to the end. Below is what I have so far, but it is not working.
#!/bin/bash #This script will take in an image and a matrix file. #The output will be an image and a matrix file. list=`ls *.png` for i in $list
I have a render script that uses several Blender 3D instances on several machines to co-render one still image. The image is split into squares of 64 x 64 pixels. In the end, I have like 200 image files, each one with a puzzle piece of the whole.
Now I would like to assembe these pieces into whole with PIL and Python, but so far cannot figure out how. I am new to PIL, but in imagemagick, a convert image1.png image2.png image3.png +append finalimage.png works a charme. But convert chokes on so many image files, so I need something automatic and scalable. I think that pictures are RGBA, so black should be the alpha channel and transparent.
I think I have to mention that the pieces are in the right position and that every piece has the original dimensions of the full picture, so it is not a problem figuring out where each piece should be. Just putting all the pictures on top of eachother and ignoring anything that is black would do the trick nicely.
How can I reach this with PIL? Which functions do I need for that? PIL does a lot of stuff, so finding my simple function is daunting.
Id like to share with you a strange behavior I�ve been seen with the printf C language function running in Fedora.The code opens a file as showed:descString = fopen( strcat( stringName, txt), a+);There are also some printf functions in the code.However, instead of the printf functions to print their content at the screen, theyve been printing them in the file with the descString file descriptor.Have you ever seen something like that?To print something to the file I use the fprintf function. I didn't make a mistake to confuse printf with fprintf. I'm sure.
I have a Perl script that has two arrays - they are related. I would like to print out the contents into two columns next to each other.
#!/usr/bin/perl open(PINGFILE, </home/casper/pingdata.txt") or die " can not open file "; my @totalfile=<PINGFILE>; foreach $string(@totalfile) { if ($string =~ m/(^1sping)(?=.*max))/) { push(usecstring,"$string");
I am aware that this question has been asked before and I have also tried the solution suggested but I am still not able to figure it out why I am getting some wierd results when I am using printf with a 64 bit signed and unsigned integer in C.I am running Suse 10.2 on a Intel(R) Pentium(R) M processor 2 GHz.I tried to call functions strtol strtoll strtoul and strtoull with different integer sizes and these are the results i get from my program shown below:
Say I want to write some of the more exotic Unicode characters to a file, what's the proper way to do it? when decimal integers are involved, we use %d for floating point we use %f and for hex we use %p.What's the equivalent marker for Unicode values that C understands?
I'm looking for an app for Linux that creates bootable images. Back when I used windows, I used Imgburn. Now, I need an app like that for Linux. Wherever I looked online, I saw either one (or both) of these ideas.
1. Run Imgburn under wine 2. Get k3b
I don't like using wine because the programs run very slow. I'm not sure exactly how to get k3b to produce a bootable image. So that's where I'm stuck.
So I'm teaching myself some scripting to try and create a fairly simple photobooth type affair... I've got gphoto2 playing fairly nicely with my canon, and imagemagick taking that output and rearranging it to a vertical format...
EDIT: *smacks forehead*
Fairly simple to do what I needed initially: Code: feh -FZ -D 1 --cycle-once $COUNTDOWN & sleep 2 & feh -FZ -D 20 --cycle-once $SMILE This shows a countdown from 5 to 1 in images and $SMILE is big that says 'smile'
So my question is thus... (fairly basic but I can't get my head round the use of & and sleep in this context) what's the best way to call my gphoto instructions (or a script with them in) mid way through the above code?!
'feh code' sleep 5 'gphoto code'
this kind of thing seems like the way, but the'sleep 5' and 'gphoto code' doesn't start until feh is finished in this case?
I am having some issues with downloading images to my website from my suppliers!
I have a text file (extracted from product their product lists) which has all of the image URLs!
I have tried to use php using the below script which was started via a cron job, however exec is blocked and my hoster has told me to use curl..... Is there something that can be written in or with curl to do the same thing?
I retooled my other script (thanks to those who helped) to work for resizing images for a netbook with 1024x600. Thanks to the ImageMagick website for help with the syntax. Here's what worked for me:
Code:
#!/bin/bash for SRCFILE in /home/robert/Pictures/*/*/*/*/*/*/* do RELPATH=`echo $SRCFILE | sed -e 's//home/robert/Pictures//'` DESTDIR="/home/robert/tmp/portable/${RELPATH%/*}"
[code]....
I figure anyone with a netbook is going to put a lower size/quality on their netbook and then keep the originals (music and pictures) on a different machine or an external hard drive.
As you can see i would like the output file to be just the dogs, not the otehr information. But because the information is mixed up how can i extract only the dogs? (i cant do and awk '{print }' because the dogs are found in colounm 2 or 3 or sometimes even 4.
I was reading through the source code of adventure in the bsdgames package and I had noticed that most of the text is read from a file called glorkz. I'm wondering about what function/technique the author used to print from the file; I've been looking through the code for a while (particularly io.c) and I haven't been able to figure it out.
I am running Linux from a DVD, not installed. I am not good with installing software, but since the DVD cannot be corrupted, I am content to operate this way. Lately, I have been having problems that previously did not occur. When I try to click on the checkbox to get rid of emails, it doesn't register in most cases, or when it does, I am clicking multiple times so it registers twice, meaning it is unchecked again. Even more frustrating is some issues that are affecting my ability to update my business. I am trying to modify spreadsheets (text not calculations).
Whenever I try to click & drag to select something to change, it keeps jumping around to select only some of what I want, something else or some combination of the 2. When I try to copy and paste several fields from 1 column to another, everything from the several fields in the source column ends up together in the last field in the target column. I am also trying to download some images from a website. There is a single column of links to the images. I have to click on the link to get to the image in order to copy it, then back out to continue looking for more links to do the same.
My computer keeps jumping back 2 steps, then forward 2 steps, and sometimes I lose my place in that list. I could deal with it if it were a small number of links, but this is a list of probably close to 20,000 links. Again, i am operating off of a live DVD so this should not be corruptible, but this has just started happening, and has been an issue the last several sessions.
I have a requirement to print images (two to be precise) from the command line of a given size and without losing too much quality.
So, I may have two images, a.jpg and b.jpg which may be 4x4" and 6x4" respectively (the sizes may vary). I need to be able to print both these on a single sheet of paper (one under the other) at a given size for each - so a may be 2x2" and b may be 3x2" - the aspect ratio will always be maintained (or as near as possible!)
I am currently doing this a very messy way (because I don't know any other way!!) - basically I am converting the picture to a given size using a set density using convert and then concatenating the two using montage.
Here is part of my script:
Code:
Don't worry too much about the case statement at the end - that is just to be able to select to print either A, B or A and B.
The issue with this is that is doesn't work great if the aspect ratio is not maintained perfectly and also, it loses quite a lot of quality on the print.
I have a very old windows app which I wrote years back in VB (o dear! ) which does the same thing and the quality is fine (I am running it through wine). I want it to be command line though because I want to run it as part of other scripts etc.
I am making a simple snake game and have problem when loading the images (apple, snakes head, snakes body). When running this code, I just see the JPanel with black background which I have created. where is my mistake?
I highlighted my code with image and paint method.
using the update maneger to update on ubuntu new linux images available 2.6.31-17 generic and after the download is complete both images exist in the grub menu should i remove them ? or just remove them from the boot menu ? and if so how could i do each.
I would like to know how do I print the line # in a script. My requirement is, I have a script which is about ~5000 lines long. If there are any errors happen I just exit. And I would like to add the line # of the script where the error happened.
Our Company is using a ERP solution in linux platform, now we are facing a problem with remote printing Linux to Linux, Linux to windows and windows to linux
I have an EPSON LX1050 printer setup via parallel port in linux machine .Recently we purchased RTextPrinter driver (Text mode printing for the Java platform)
I can print java app via Linux Local system, windows local system and windows to windows .But Network printing isn't working
The following the java class path of local and network printer setup
I know that ImageMagick's convert program can be used as follows to convert a collection of images -- say, in PNG format -- to a PDF file:
convert *png output.pdf
The problem with this is that each image is then stretched to fit on one page, whereas I would like to keep the original dimensions of the images and put as many as possible on one page in the PDF file before moving on to another page.
i tried a code to accept a character and print the same ! i can accept it with following code but its not working with printing that character i use NASM version 2.07
Code:
segment .data msg1: db 'Enter a key',10 msg1len: equ $-msg1
I expected more from ubuntu 10.4 with regards to printing with exact size photos and with poor auto colour printing but the situation remains unchanged! for instance .. the photo size configurations for ubuntu/fspot/gimp and others are not compatible with my printers (HP and Brother) .. here in Europe a typical standard size photo (10x15inches or 150x100mm are not even on the Ubuntu listing? I have tried all listed possibilities including "custom" (which does not seem to ever work correctly?)and the result at best is photos with uneven boarders or at worse my printer goes a bit crazy with much wasted photo paper and expensive ink ...even photos selected for "no boarders" still produces photos with the self same uneven boarders.
I have tried pretty much everything over time following advice in this forum and including using HPlip and updating drivers required for my Brother printer but the root problem seemingly lies with the Ubunto photo size setup listing. Working with Ubuntu over the years I have found that it can do pretty much everything that Windows can do except for this dam ongoing photo quality and configuration problem.