General :: Create A Png Or Jpeg File Programmatically?

Oct 3, 2010

Given a matrix with 0,1 entries, how can I create a graphic in linux such that we have a black square or pixel if the entry is one and white otherwise?

For example, if the matrix is:

0001000
0011100
0111110
0000000

then I want a graphic that looks like:

[code]....

I will be working with many large matrices, e.g. 1000x1000, or 5000x1000 so I need to do this automatically.

View 6 Replies


ADVERTISEMENT

Ubuntu Multimedia :: Create Video From Jpeg Files?

Apr 5, 2010

I am using the following command to create a video of a bunch of jpeg files. The problem is that some of the jpegs are portrait and others are landscape. Ffmpeg is stretching the portrait images. Is it possible to maintain aspect ratio of the jpegs... perhaps put black bars on the portrait images using ffmpeg?

ffmpeg -r .75 -f image2 -i Image%d.jpg output.mp4

View 3 Replies View Related

Programming :: Programmatically Getting Standard File Dialog

Jul 14, 2010

Is it possible to do the following in C/C++ in Linux:Without direct linking (my program should NOT depend on Qt or GTK), display a GTK or Qt based file dialog.The behaviour should be something like this when my program runs, when you want to open a file:The program scans whether you have Qt installed. If so, it somehow manages to link itself to Qt (e.g. dynamically loading the .so file) and display its file dialog and get the path from it. If Qt wasn't found, it tries the same with GTK. If that also wasn't found, it displays a less powerful replacement dialog instead (better than nothing).

Or is there any other simple way in Linux to get a standard file dialog somehow (similar to when compiling for Windows you can very easily get its standard file dialog, no matter what version of Windows, in your code, even if your program doesn't use any other Windows GUI at all).

View 4 Replies View Related

Programming :: Programmatically Set File Associations In Gnome/KDE?

Jun 3, 2010

I would like to associate my program with several file extensions programatically.

Everything I've been finding online is how a user would set a file association, does anyone know how to do this progormatically (bash, C++, etc)?

I would mostly like to get this to work with Gnome, but KDE would be nice as well.

View 3 Replies View Related

General :: How To Stop Fan Programmatically

May 27, 2011

My system doesn't reacts at writing values below 255 to /sys/class/hwmon/hwmon0/device/pwm(2,3) which correspond to 3-wire case fans connected via M/B (ga-890gpa-ud3h) headers. The idea was taken from [url]

ls /sys/class/hwmon/hwmon0/device/

It indeed shows the actual speed:

But refuses to write to fanX_input: permission denied (even for root).

More specs: kernel 2.6.38.4, sensors output is:

I do not run any daemons for fan control, but suppose the speed may be set by CPU in-kernel governor. How to stop a fan under this conditions without doing hardware tricks?

Upd: part of pwmconfig's output:

Devices:

Found the following PWM controls:

hwmon0/device/pwm2 is currently setup for automatic speed control. In general, automatic mode is preferred over manual mode, as it is more efficient and it reacts faster. Are you sure that you want to setup this output for manual control? (n) y hwmon0/device/pwm3 hwmon0/device/pwm3 is currently setup for automatic speed control.

In general, automatic mode is preferred over manual mode, as it is more efficient and it reacts faster. Are you sure that you want to setup this output for manual control? (n) y

Test:

Warning! This program will stop your fans, one at a time, for approximately 5 seconds each! This may cause your processor temperature to rise! If you do not want to do this hit control-C now!

Hit return to continue:

Would you like to generate a detailed correlation (y)? y

This was stopping CPU fan. And:

View 2 Replies View Related

General :: Programmatically Detecting A USB Device?

Dec 14, 2010

I have a USB modem and a large C++ application that needs to detect whether that device is present or not. I was hoping to get advice for what the best method to do so would be. The only solution I've thought of is to parse the output of lsusb and look for the vendor and product ID of my device, but that seems a little hack-ish and inefficient. Is there a command or program that I can provide it a vendor/product ID for a USB device and it can tell me whether or not such a device is present in the system? Or another, better way to detect the device than parsing the lsusb output that I've been thinking

View 2 Replies View Related

Programming :: Get Jpeg File Header Using C Language?

Oct 10, 2009

I want to get files header as much as possible which are mostly used so how can i get jpeg file header using C ?

If any other headers of MS Office is possible for U.

View 7 Replies View Related

General :: Programmatically Connect To A Box Running Ssh From A Windows Pc?

May 11, 2010

I am writing an application that has a web service client on a Windows PC that needs to call a web service on a Linux server. In order to create the client, I need to be able to programmatically read the WSDL on the server and use it to create the client. I'm using the web tools in MyEclipse to build the client.

The Linux server is running Red Hat, I believe, with ssh enabled. I can connect from Linux to Windows with no problem, but I can't reach the Linux box from Windows. I get one of three errors when I try: no path to host, connection reset, or unknown error number, depending on the port I use. I've googled for an answer, but haven't found anything yet.Is there some way to add the Windows IP to a permission file on the Linux machine so it will be recognized when it queries for the WSDL?

View 9 Replies View Related

Ubuntu :: Can't Find A Way To Insert An Existing Jpeg File Into Gimp?

Jun 26, 2011

I am trying to design a graphic in gimp2.6 image editor and I can't find a way to insert an existing jpeg file into gimp,

View 2 Replies View Related

Software :: Program: Compile Jpeg Into Single File, Like A Book, And Maintain Quality?

Mar 30, 2010

I've been trying to find a way to take a bunch of jpeg images and while maintaining their quality (no loss at all) compile them in such a way as to make one coherent file. Maybe something like a pdf, but while maintaining quality. I've tried converting to pdf and djvu, but the quality is always reduced, but if you know of a way to preserve quality, I'll use it.An alternative is an image viewer that can look inside archives, so I just make a zip or tgz of the images and then use the image viewer to access them. I've tried a few

View 9 Replies View Related

General :: Make A .flv From A Bunch Of Jpeg-s?

Aug 17, 2010

I have a bunch of jpeg and want to make a single flv video file from it.

I need flv/mp4 (vp6/h264 codecs).

It must be done via console command on Linux.

View 1 Replies View Related

General :: Limit On File Size - Doesn't Allow User To Create File Which Are Greater Than 100Kb

Jun 13, 2011

I was just testing specifying limit on file size to a user and have added the following to /etc/security/limits.conf bob soft fsize 100 This basically should have said not to allow bob to create anyfile greater than 100Kb in size.

But the interesting thing is, if bob already has any file which is greater than 100Kb in size, it even doesn't allow to log him into the system both from console and SSH. Also nothing is logged in logs.. How do I configure it so that, bob can login to the system even though he has any file greater than 100Kb (but doesn't allow him to create file which are greater than 100Kb) ??

View 3 Replies View Related

General :: Vsftp Cannot Upload File / Error 553 Cannot Create The File

Jul 26, 2010

I am testing my ftp server configuration.Anonymous download works , however anonymous upload does not.I am getting the following error message from both Windows and Linux 5.4clients : 553 cannot create the file.And i am running Fedore 12.

View 3 Replies View Related

General :: BASH/Dash : Put A JPEG Or PNG Into The Clipboard?

Dec 5, 2010

copy a jpeg or a png and place it into the clipboard of X11 of my icewm. which program can do cat "myfile.jpg" > ?theclipboardofx11?

View 10 Replies View Related

General :: Create Device File For Image File?

Sep 8, 2010

Everything in Linux is a file, right? And everything can be represented by a file? Is there some way I could create a block device file that represents (i.e., provides an interface to) this image file? If so, then I could use fdisk on the device file to split it into partitions, format the partitions, and then mount them as directories. I could create a file system within a file system, which would be fun.

View 2 Replies View Related

General :: Does Linux Support Images In .jpeg Format?

Jun 29, 2010

Does linux support images in .jpeg format? What is the difference if I save my image in .jpeg or .JPEG or .jpg from a linux point of view? Is this case sensitive?

View 5 Replies View Related

General :: Best Utility For Opening JPEG / PNG And TIFF Files?

Aug 21, 2010

Which is the most commonly used utility for opening .jpeg, .png and .tiff files on Linux?

View 3 Replies View Related

General :: Can't Seem To Create A Dot File In /tmp

Mar 2, 2011

why I cant seem to create a dot file (a file that starts with a dot) in my /tmp folder even with root priviledges. I installed F-Prot for linux & when I try to do a scan it complains it "can't stat a file" it seems to want to create & quits. So I tried creating it my self but it wont create a file that starts with a dot it seems. I also tried "chmod go+rx /tmp/*"

This is the error

root@JASONS-BRAAIN:/opt/f-prot# /opt/f-prot/fpscan -l
F-PROT Antivirus version 6.3.3.5015 (built: 2009-12-23T13-43-55)
FRISK Software International (C) Copyright 1989-2009
Engine version: 4.5.1.85
Arguments: -l

[Code].....

View 3 Replies View Related

Ubuntu :: Programmatically Finding Out The Application Font

Jan 10, 2011

I am writing an Air application and I would like to have the app use the font indicated in Appearance Preferences.

A similar problem to this one :

[URL]

I do not have Gtk::Settings and I have looked in ~/.gconf/desktop/gnome/ but I do not have an interface folder and none of the others I opened have any font details.

I have tried simply not setting a font within my application but it is using a font not specified in the Appearance Preferences at all. It looks like Times.

Ideally I would like to be able to get this information from Ubuntu using a native process :

[URL]

get the font name of the Application font or would I have to write a script and call that from inside Air?

I have a default installation of Ubuntu 10.4 with Unity running on top of Gnome. (I think this is correct. I certainly can get Nautilus running quite easily and as I mentioned earlier I have ~/.gconf/desktop/gnome/ folders).

The brief is to get the application working on the default installation so I cannot install anything but the target machine I am using has got 'gconftool'.

View 2 Replies View Related

Ubuntu :: Generate Pdf Documents Programmatically Using Ruby

Apr 1, 2011

I need to generate pdf documents programmatically using Ruby. i.e. I don't want a GUI interface but an API interface. The bulk of my document is text but there are images included as well. I've looked at this thread: [URL] and it's 2 main recommendations PDFEdit and ImageMagik. PDFEdit has scripting available but I can't get my head round how to call this using Ruby. ImageMagik has a number of Ruby wrappers and is the kind of thing I want but as far as I can tell it only deals with Images and my stuff is mainly text.

View 1 Replies View Related

Networking :: Programmatically Check Process Down / Up Stream

Aug 31, 2010

I wonder if there's a way to capture the same information I can get from nethogs to a file. All I need it per process (rather than per interface) what is the sent/received traffic.

View 1 Replies View Related

Software :: How To Programmatically Determine Monitor Type

Jul 7, 2010

I know the tool system-config-display can tell me all about my display but it's not available on all systems and so I'm looking for alternative ways to get my monitor type. Ideally, I could just look in /proc but I don't see anything there and I would like to be able to do so from a script perhaps written in bash or perl. Is there some place to get this info, say in a config file somewhere?

View 2 Replies View Related

General :: How To Using Redirection To Create A File

May 15, 2011

I have a linux script that generates a string and prints it to the console. I want this string to be the name of a file and open it for editing in vi. How can this be done?

View 3 Replies View Related

General :: Create A LiveDC From An ISO File?

Oct 4, 2010

How do I create a LiveCD from an ISO file?

View 2 Replies View Related

General :: Create .so File On Fedora 7?

Mar 26, 2010

I am working on JNI(Java Native Interface) on fedora 7 where i need to create a .so file of .c.(For example Hello.c to Hello.so). But i am not getting options to be used with the "cc" command. What option or the command.

View 6 Replies View Related

General :: Using Tar To Create Bzip File?

May 19, 2011

i'm trying to use tar to create a zip file but everytime I try using the command it just dumps out to the screen... I know i'm missing something simple but darned if I can figure out what it is. The command i'm using:tar -cpvz archive.bz2 /directory_name/*

View 5 Replies View Related

General :: Internally Create A File?

Jan 16, 2011

I am using NetBSD-5.1. 1. I wanted to know what happens internally when we create a file in linux. ?The header file STDIO.H present in "src/include/stdio.h" contains a "FILE" structure with various members like _p, _cookie, etc. 2. wanted to know how does internally memory gets allocated for them.

View 1 Replies View Related

Programming :: Get Default Browser Name And Mail Client Name By Programmatically?

May 4, 2009

I am developing a application in which i have to show the name of default browser and mail client. i want to run this application on RedHat, SuSE, Mandriva, and Ubuntu. I have checked similar threads but not found any useful information.

View 8 Replies View Related

General :: Create Symlink For Every File Want To Include?

Jul 4, 2010

I have a CMS I have developed, which will run on several sites all hosted in sub directories on my dedicated server. I want to create symlinks for the main files of the CMS, including all config files, functions and admin sections. Then there will be a few files specific to each site.I read some tutorials on creating symlinks, although most are not very good in my opinion.

Do you have to create a symlink for every file I want to include? Or can I just create a symlink to a directory? For example:CMS is located at /www/cms/.Can I make www/domain1/ point to that directory, and if so, will all files include themselves correctly. I think I am a bit confused on how this works.

View 1 Replies View Related

General :: Create File With 751 Permissions At Creation

Apr 5, 2011

I keep creating practice perl scripts in a linux directory using vi <filename> and need to chmod 751 <filename> before I can run it as I wish to. I'm sure there is a simple way to default my permissions or config them at creation, but I'm not familiar with it ayuda me por favor.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved