Daily Archives

Articles indexed Sunday April 25 2010

Page 13/72 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Is there a quality, file-size, or other benefit to JPEG sizes being multiples of 8px or 16px?

    - by davebug
    The JPEG compression encoding process splits a given image into blocks of 8x8 pixels, working with these blocks in future lossy and lossless compressions. [source] It is also mentioned that if the image is a multiple 1MCU block (defined as a Minimum Coded Unit, 'usually 16 pixels in both directions') that lossless alterations to a JPEG can be performed. [source] I am working with product images and would like to know both if, and how much benefit can be derived from using multiples of 16 in my final image size (say, using an image with size 480px by 360px) vs. a non-multiple of 16 (such as 484x362). In this example I am not interested in further alterations, editing, or recompression of the final image. To try to get closer to a specific answer where I know there must be largely generalities: Given a 480x360 image that is 64k and saved at maximum quality in Photoshop [example]: Can I expect any quality loss from an image that is 484x362 What amount of file size addition can I expect (for this example, the additional space would be white pixels) Are there any other disadvantages to growing larger than the 8px grid? I know it's arbitrary to use that specific example, but it would still be helpful (for me and potentially any others pondering an image size) to understand what level of compromise I'd be dealing with in breaking the non-8px grid. The key issue here is a debate I've had is whether 8-pixel divisible images are higher quality than images that are not divisible by 8-pixels.

    Read the article

  • Can a JPEG compressed image be rotated without a loss in quality?

    - by Mat
    JPEG is a lossy compression scheme, so decompression-manipulation-recompression normally reduces the image quality further for each step. Is it possible to rotate a JPEG image without incurring further loss? From what little I know of the JPEG algorithm, it naively seems possible to avoid further loss with a bit of effort. Which common image manipulation programs (e.g. GIMP, Paint Shop Pro, Windows Photo Gallery) and graphic libraries cause quality loss when performing a rotation and which don't?

    Read the article

  • What ever happened to APL?

    - by lkessler
    When I was at University 30 years ago, I used a programming language called APL. I believe the acronym stood for "A Programming Language", This language was interpretive and was especially useful for array and matrix operations with powerful operators and library functions to help with that. Did you use APL? Is this language still in use anywhere? Is it still available, either commercially or open source? I remember the combinatorics assignment we had. It was complex. It took a week of work for people to program it in PL/1 and those programs ranged from 500 to 1000 lines long. I wrote it in APL in under an hour. I left it at 10 lines for readability, although I should have been a purist and worked another hour to get it into 1 line. The PL/1 programs took 1 or 2 minutes to run on the IBM mainframe and solve the problem. The computer charge was $20. My APL program took 2 hours to run and the charge was $1,500 which was paid for by our Computer Science Department's budget. That's when I realized that a week of my time is worth way more than saving some $'s in someone else's budget. I got an A+ in the course. p.s. Don't miss this presentation entitled: "APL one of the greatest programming languages ever"

    Read the article

  • How I do I make controls/elements move with inertia?

    - by Kris Erickson
    Modern UI's are starting to give their UI elments nice inertia when moving. Tabs slide in, page transitions, even some listboxes and scroll elments have nice inertia to them (the iphone for example). What is the best algorythm for this? It is more than just gravity as they speed up, and then slow down as they fall into place. I have tried various formulae's for speeding up to a maximum (terminal) velocity and then slowing down but nothing I have tried "feels" right. It always feels a little bit off. Is there a standard for this, or is it just a matter of playing with various numbers until it looks/feels right?

    Read the article

  • How to speed up marching cubes?

    - by Dan Vinton
    I'm using this marching cube algorithm to draw 3D isosurfaces (ported into C#, outputting MeshGeomtry3Ds, but otherwise the same). The resulting surfaces look great, but are taking a long time to calculate. Are there any ways to speed up marching cubes? The most obvious one is to simply reduce the spatial sampling rate, but this reduces the quality of the resulting mesh. I'd like to avoid this. I'm considering a two-pass system, where the first pass samples space much more coarsely, eliminating volumes where the field strength is well below my isolevel. Is this wise? What are the pitfalls? Edit: the code has been profiled, and the bulk of CPU time is split between the marching cubes routine itself and the field strength calculation for each grid cell corner. The field calculations are beyond my control, so speeding up the cubes routine is my only option... I'm still drawn to the idea of trying to eliminate dead space, since this would reduce the number of calls to both systems considerably.

    Read the article

  • Python many-to-one mapping (creating equivalence classes)

    - by Adam Matan
    Hi, I have a project of converting one database to another. One of the original database columns defines the row's category. This coulmn should be mapepd to a new category in the new databse. For example, let's assume the original categories are:parrot, spam, cheese_shop, Cleese, Gilliam, Palin Now that's a little verbose for me, And I want to have these rows categorized as sketch, actor - That is, define all the sketches and all the actors as two equivalence classes. >>> monty={'parrot':'sketch', 'spam':'sketch', 'cheese_shop':'sketch', 'Cleese':'actor', 'Gilliam':'actor', 'Palin':'actor'} >>> monty {'Gilliam': 'actor', 'Cleese': 'actor', 'parrot': 'sketch', 'spam': 'sketch', 'Palin': 'actor', 'cheese_shop': 'sketch'} That's quite awkward- I would prefer having something like: monty={ ('parrot','spam','cheese_shop'): 'sketch', ('Cleese', 'Gilliam', 'Palin') : 'actors'} But this, of course, sets the entire tuple as a key: >>> monty['parrot'] Traceback (most recent call last): File "<pyshell#29>", line 1, in <module> monty['parrot'] KeyError: 'parrot' Any ideas how to create an elegant many-to-one dictionary in Python? Thanks, Adam

    Read the article

  • How can I dock/anchor two listviews vertically aligned to grow equally on orientation change?

    - by Pentium10
    I have two ListViews in Compact Framework 2.0 positioned vertically next to each other. Each of the ListViews occupies half of the screen. How can I dock/anchor them so when the orientation changes for landscape they grow equally and do not overlap each other. From -------- -------- | | | | | | | | | | | | -------- -------- Into -------------- ------------- | | | | | | | | | | | | -------------- -------------

    Read the article

  • Setting up SharePoint without Active Directory

    - by eJugnoo
    In order to setup SharePoint without AD, you need to run following PowerShell command on Management Shell after installing SharePoint on your server, but before running Config Wizard: (we don’t want to run this SP farm in stand-alone mode!) 1. New-SPConfigurationDatabase SYNOPSIS     Creates a new configuration database. SYNTAX     New-SPConfigurationDatabase [-DatabaseName] <String> [-DatabaseServer] <String> [[-DirectoryDomain] <String>] [[-DirectoryOrganizationUnit] <String>]     [[-AdministrationContentDatabaseName] <String>] [[-DatabaseCredentials] <PSCredential>] [-FarmCredentials] <PSCredential> [-Passphrase] <SecureString>      [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>] DESCRIPTION     The New-SPConfigurationDatabase cmdlet creates a new configuration database on the specified database server. This is the central database for a new SharePoint farm.     For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation (http://go.microsoft.com/fwlink/?LinkId=163185). RELATED LINKS     Backup-SPConfigurationDatabase     Disconnect-SPConfigurationDatabase     Connect-SPConfigurationDatabase     Remove-SPConfigurationDatabase REMARKS     To see the examples, type: "get-help New-SPConfigurationDatabase -examples".     For more information, type: "get-help New-SPConfigurationDatabase -detailed".     For technical information, type: "get-help New-SPConfigurationDatabase -full". NOTE: Use –AdministrationContentDatabaseName switch to pass the name of Admin database you want instead of GUID-based name it automatically creates. Hence, one can pretty much easily control Admin, Config, and Content database names at the time of farm creation. If creating new farm, you can also delete and re-provision any service databases automatically created, from UI, to decide what database names you want. 2. Run SharePoint Configuration Wizard, and you’ll following as already added to farm. Select do not discconect from farm, and proceed… Select the port, and authentication (NTLM in my case). Click next, and wizard will complete the remaining steps of provisioning, including creation of Central Admin Web App on the desired port. Once successful, it will open the Central Admin site and ask you to run Farm Config Wizard. I chose to skip and do things manually, to remain in control of what is happening on the farm. Like creating web-app for site collections, creating the very first site collection, and any other service applications. I needed this to create a public-facing installation of SharePoint Foundation RTM on a server which didn’t have AD. Now I am going to setup FBA, and possibly Live ID Auth as well. I will be also setting up RBS, and multi-tenancy on this farm ,and would post any notes, and findings here… --Sharad

    Read the article

  • Why is cleartype so bad at high res?

    - by ULTRA_POROV
    Cleartype is great when displaying small text 10 - 16px HOWEVER when you display something above 20px it start's looking like shit. Just compare it to Photoshop. Photoshop rendering at small size is not very impressive, too blurry. But if you compare it at 20px + Photoshop wins all the time. Cleartype looks jaggy around the edges, almost like there is no cleartype at all. Can this be fixed, or is it just the way cleartype is?

    Read the article

  • MATLAB syntax of (:)

    - by user198729
    >> I=[2 1 3;3 2 4] I = 2 1 3 3 2 4 >> I(:) ans = 2 3 1 2 3 4 >> I(1:2) ans = 2 3 >> Why the first call I(:) returns a vector while the second I(1:2) doesn't which is essentially the same as I(:)?

    Read the article

  • Complex query in nHibernate using DetachedCriteria

    - by paszczi
    Hello! I'm currently trying to move from hand-crafted hql to queries constructed via DetachedCriteria. I have and HQL: from GenericObject genericObject left join fetch genericObject.Positions positions where (positions.Key.TrackedSourceID, positions.Key.PositionTimestamp) in (select gp.Key.TrackedSourceID, max(gp.Key.PositionTimestamp) from GenericPosition gp group by gp.Key.TrackedSourceID) Now using DetachedCriteria: var subquery = DetachedCriteria .For (typeof (GenericPosition), "gp") .SetProjection (Projections.ProjectionList () .Add (Projections.Property ("gp.Key.TrackedSourceID")) .Add (Projections.Max ("gp.Key.PositionTimestamp")) .Add (Projections.GroupProperty ("gp.Key.TrackedSourceID")) ); var criteriaQuery = DetachedCriteria .For (typeof (GenericObject), "genericObject") .CreateAlias ("genericObject.Positions", "positions") .SetFetchMode ("genericObject.Positions", FetchMode.Eager) .Add (Subqueries.In (??, subquery)) I don't know what to type instead of ?? to create expression like (positions.Key.TrackedSourceID, positions.Key.PositionTimestamp)

    Read the article

  • Using Frameset with Treeviews in ASP.Net

    - by Ben
    Afternoon, I am trying have an HTML file containing a frameset which contains two frames. I have populated the left Frame with a URL containing a TreeView with URL's for the nodes. I would like the to be able to select a URL from the treeview in the left hand frame, and have it set the src of the right hand frame to be that URL. Is that possible? Thanks

    Read the article

  • Not able to use 7-Zip to compress stdin and output with stdout?

    - by acidzombie24
    I get the error "Not implemented". I want to compress a file using 7-Zip via stdin then take the data via stdout and do more conversions with my application. In the man page it shows this example: % echo foo | 7z a dummy -tgzip -si -so /dev/null I am using Windows and C#. Results: 7-Zip 4.65 Copyright (c) 1999-2009 Igor Pavlov 2009-02-03 Creating archive StdOut System error: Not implemented Code: public static byte[] a7zipBuf(byte[] b) { string line; var p = new Process(); line = string.Format("a dummy -t7z -si -so "); p.StartInfo.Arguments = line; p.StartInfo.FileName = @"C:\Program Files\7-Zip\7z.exe"; p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; p.StartInfo.CreateNoWindow = true; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.RedirectStandardError = true; p.StartInfo.RedirectStandardInput = true; p.Start(); p.StandardInput.BaseStream.Write(b, 0, b.Length); p.StandardInput.Close(); Console.Write(p.StandardError.ReadToEnd()); //Console.Write(p.StandardOutput.ReadToEnd()); return p.StandardOutput.BaseStream.ReadFully(); } Is there another simple way to read the file into memory? Right now I can 1) write to a temporary file and read (easy and can copy/paste some code) 2) use a file pipe (medium? I have never done it) 3) Something else.

    Read the article

  • Crystal Reports 2008

    - by robblot
    I am going to upgrade Visual Studio 2008 Professional to Visual Studio 2010 Preimum. I also have Crystal Reports 2008 installed. Will Crystal Reports cause any problems? And will Visual Studio 2010 Preimum recognize my Crystal Reports install alllowing usage of Crystall Reports 2008 in my applications?

    Read the article

  • Need to convert ascii value to hex value

    - by SA
    Hi, I need to convert ascii to hex values. Refer to the Ascii table but I have a few examples listed below: ascii 1 = 31 2 = 32 3 = 33 4 = 34 5 = 35 A = 41 a = 61 etc But I am using int instead of string values. Is it possible to do that. Therefore int test = 12345; Need to get the converted i = 3132333435

    Read the article

  • Hitting a XML API using phonegap?

    - by smnirven
    Hey folks, I am looking at using phonegap to create a mobile app that accesses a xml api, I noticed there is a HTTP class defined in phonegap http://phonegap.pbworks.com/JavaScript-API#http, but I can't seem to find anyone that has used it yet. Any examples out there or hints/tips on using the http class to access a xml api?

    Read the article

  • Open Source Project & Language Selection

    - by James
    I'm getting ready to start an open-source project that will target .NET/Mono. For those who have started their own open source venture... Do you let the fact that a project is going to be open-source weigh on the decision of what language to use? For example. Most .NET open-source projects are written in C#. However, if you were more comfortable with VB.NET, Boo, Nemerle, etc... would you use it? What other considerations are there? This particular project will be a core library and application for geocaching. Similar to GSAK.

    Read the article

  • Penalty clause on programming contract

    - by Everyone
    I am considering the move to the other side of development, as a contract programmer. SO has given me a good few hints on the kind of figures to quote ( and why ), and a few points to bear in mind such as Non-competition and [IP Protection] Having worked as a programmer for a while, I know that a few reasons for deadline delays may be - Estimates can be all over the place both from the Contractor, and the Job provider Things like bandwidth bottlenecks, merge for high-impact code etc Clarification time on provided requirements... etc If you have worked as a contract programmer then How frequently do you encounter a penalty/forfeit clause in your agreement? What do you deem unacceptable in the penalty/forfeit clause?

    Read the article

  • C# - Kinetic scrolling with ListBox or ListView?

    - by fonix232
    I am doing a simple application for touch screen devices, and I would like to implement today's fashion: kinetic scrolling. Is it possible to do, and if yes, how? PS: Kinetic scrolling: A scrolling mechanism where you don't use a scrollbar to scroll the content, but you touch the list itself, and pull and push it. The "physics engine" then counts out the speed, and stops based on the given settings.

    Read the article

  • Fast Lightweight Image Comparisson Metric Algorithm

    - by gav
    Hi All, I am developing an application for the Android platform which contains 1000+ image filters that have been 'evolved'. When a user selects a photo I want to present the most relevant filters first. This 'relevance' should be dependent on previous use cases. I have already developed tools that register when a filtered image is saved; this combination of filter and image can be seen as the training data for my system. The issue is that the comparison must occur between selecting an image and the next screen coming up. From a UI point of view I need the whole process to take less that 4 seconds; select an image- obtain a metric to use for similarity - check against use cases - return 6 closest matches. I figure with 4 seconds I can use animations and progress dialogs to keep the user happy. Due to platform contraints I am fairly limited in the computational expense of the algorithm. I have implemented a technique adapted from various online tutorials for running C code on the G1 and hence this language is available Specific Constraints; Qualcomm® MSM7201A™, 528 MHz Processor 320 x 480 Pixel bitmap in 32 bit ARGB ~ 2 seconds computational time for the native method to get the metric ~ 2 seconds to compare the metric of the current image with training data This is an academic project so all ideas are welcome, anything you can think of or have heard about would be of interest to me. My ideas; I want to keep the complexity down (O(n*m)?) by using pixel data only rather than a neighbourhood function I was looking at using the Colour historgram/Greyscale histogram/Texture/Entropy of the image, combining them to make the measure. There will be an obvious loss of information but I need the resultant metric to be substantially smaller than the memory footprint of the image (~0.512 MB) As I said, any ideas to direct my research would be fantastic. Kind regards, Gavin

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >