识别PDF文件中的RGB和CMYK(Identify RGB and CMYK in a PDF file)
我知道之前已经问过这个问题,但是没有解释得太多,因为我没有在这里发表评论的声誉,我问的是这个问题。
上述线程中提供的答案检索rg和b值,但我不知道是什么告诉我找到的值是否显示哪个部分是CMYK(据我所知,渲染后所有值都转换为RGB)。
我需要首先确定pdf文件中使用的颜色系统,我现在明白CMYK和RGB可以同时用在一个文件中。 所以我需要分析我的C#应用程序中的pdf文件,并找到一种方法将CMYK部分转换为RGB(如果需要)。
I know this question has been asked before but it doesn't explain much and as I don't have a reputation to comment there I am asking this question.
The answer that was provided in the aforementioned thread retrieves the r g and b values but I don't know what tells if the values that are found show what part is CMYK (as I understand that after rendering all values are converted into RGB).
I need to first identify what color system is used in a pdf file, I understand now that CMYK and RGB can be simultaneously used in a single file. So I need to analyze the pdf file in my C# application and find a way to convert the CMYK parts to RGB if need be.
原文:https://stackoverflow.com/questions/31198261
最满意答案
这是一个脚本,列出了所有文件组中的所有对象和所有索引:
http://gallery.technet.microsoft.com/scriptcenter/c7483555-cc22-4f6c-b9c4-90811eb3bdb6-- List all Objects and Indexes -- per Filegroup / Partition and Allocation Type -- including the allocated data size SELECT DS.name AS DataSpaceName ,AU.type_desc AS AllocationDesc ,AU.total_pages / 128 AS TotalSizeMB ,AU.used_pages / 128 AS UsedSizeMB ,AU.data_pages / 128 AS DataSizeMB ,SCH.name AS SchemaName ,OBJ.type_desc AS ObjectType ,OBJ.name AS ObjectName ,IDX.type_desc AS IndexType ,IDX.name AS IndexName FROM sys.data_spaces AS DS INNER JOIN sys.allocation_units AS AU ON DS.data_space_id = AU.data_space_id INNER JOIN sys.partitions AS PA ON (AU.type IN (1, 3) AND AU.container_id = PA.hobt_id) OR (AU.type = 2 AND AU.container_id = PA.partition_id) INNER JOIN sys.objects AS OBJ ON PA.object_id = OBJ.object_id INNER JOIN sys.schemas AS SCH ON OBJ.schema_id = SCH.schema_id LEFT JOIN sys.indexes AS IDX ON PA.object_id = IDX.object_id AND PA.index_id = IDX.index_id ORDER BY DS.name ,SCH.name ,OBJ.name ,IDX.name
感谢@RaphaëlAlthaus关于该问题的评论中的链接。
关于我的问题中的第二点,我无法将剩余的对象从PRIMARY移动,因为它是LOB数据。 根据CREATE TABLE的文档,“无法随后更改CREATE TABLE中指定的任何大型列数据的存储”。 厄运。
Here's a script which lists all objects and all indexes in all filegroups:
http://gallery.technet.microsoft.com/scriptcenter/c7483555-cc22-4f6c-b9c4-90811eb3bdb6-- List all Objects and Indexes -- per Filegroup / Partition and Allocation Type -- including the allocated data size SELECT DS.name AS DataSpaceName ,AU.type_desc AS AllocationDesc ,AU.total_pages / 128 AS TotalSizeMB ,AU.used_pages / 128 AS UsedSizeMB ,AU.data_pages / 128 AS DataSizeMB ,SCH.name AS SchemaName ,OBJ.type_desc AS ObjectType ,OBJ.name AS ObjectName ,IDX.type_desc AS IndexType ,IDX.name AS IndexName FROM sys.data_spaces AS DS INNER JOIN sys.allocation_units AS AU ON DS.data_space_id = AU.data_space_id INNER JOIN sys.partitions AS PA ON (AU.type IN (1, 3) AND AU.container_id = PA.hobt_id) OR (AU.type = 2 AND AU.container_id = PA.partition_id) INNER JOIN sys.objects AS OBJ ON PA.object_id = OBJ.object_id INNER JOIN sys.schemas AS SCH ON OBJ.schema_id = SCH.schema_id LEFT JOIN sys.indexes AS IDX ON PA.object_id = IDX.object_id AND PA.index_id = IDX.index_id ORDER BY DS.name ,SCH.name ,OBJ.name ,IDX.name
Thanks @Raphaël Althaus for the link in the comments on the question.
Regarding the second point in my question I couldn't move the remaining objects from PRIMARY as it is LOB data. According to the documentation of CREATE TABLE, "the storage of any large column data specified in CREATE TABLE cannot be subsequently altered." Bad luck.
相关问答
更多-
LINUX 如何查看JPG文件[2022-06-13]
find -
SELECT DATALENGTH(imagecol) FROM table 请参阅MSDN SELECT DATALENGTH(imagecol) FROM table See MSDN
-
MariaDB中的FileGroup(FileGroup in MariaDB)[2021-09-12]
不是这样的。 你想达到什么目的? 请记住,有些事情是因为磁盘曾经比数据库小。 今天,很少有问题。 此外,RAID控制器,SAN等消除了手动确定文件到哪里的需要(甚至不需要)。 即使在运行中,操作系统也可以连接多个卷。 等等。 MyISAM能够说明数据的位置和索引文件的位置。 但MyISAM几乎没有死。 即使在那里,将数据放在一个驱动器上并将索引放在另一个驱动器上也是愚蠢的。 在执行查询时,首先访问索引,然后是数据。 如果有任何表现获得,那很少。 简单的RAID条带可能会做得更好。 InnoDB有一种方法可以 ... -
好的,让它工作。 原来数据库文件所在的NTFS卷大量分片。 停止的SQL Server,对整个事情进行了整理,所有这一切都是好的。 OK, got it working. Turns out that an NTFS volume where the DB files were located got heavily fragmented. Stopped SQL Server, defragmented the whole thing and all it was fine ever since.
-
文件组名称NewFileStream表明它是一个文件流文件组。 您不能将表行放在文件流文件组上。 要使用filestream列创建表,您需要: 指定为行数据定义的文件组 指定为文件流数据定义的文件组 指定ROWGUIDCOL和uniqueidentifier列上的唯一约束 为filestream列指定FILESTREAM 该示例将行放在默认文件组和NewFileStream上的文件组列上。 CREATE TABLE [myTable] ( [Id] [int] NOT NULL IDENTITY, ...
-
IMO最简单的方法是使用模式比较工具之一( 我的工具 , 红门的SQL Compare , Apex SQL Diff作为几个例子)来创建模式的脚本。 然后,编辑该脚本以在正确的文件组中创建空的所有对象。 完成后,您可以使用相同的工具将新数据库与正确的文件组进行比较,并生成脚本以便为您迁移数据。 值得测试多个,以找到最适合您的。 The simplest way to do it, IMO, would be to use one of the schema comparison tools (My too ...
-
如何在SQL Server中查找文件组内容的类型和大小?(How to find type and size of content of a filegroup in SQL server?)[2024-01-18]
这是一个脚本,列出了所有文件组中的所有对象和所有索引: http://gallery.technet.microsoft.com/scriptcenter/c7483555-cc22-4f6c-b9c4-90811eb3bdb6 -- List all Objects and Indexes -- per Filegroup / Partition and Allocation Type -- including the allocated data size SELECT DS.name AS Da ... -
使用这样的查询: select t.name as table_name, i.name as index_name, ds.name as data_space_name, ds.type_desc, ps.name as partition_scheme_name from sys.tables t join sys.indexes i on t.object_id = i.object_id join sys.data_spaces ds on i.data_space ...
-
SQL Server 2008 Express Edition文件大小限制问题(SQL Server 2008 Express Edition file size limitation problem)[2022-03-15]
SQL Server 2008 Express支持4GB。 SQL Server 2008 R2 Express支持10GB。 不要忘记,大小限制不包括日志文件 (SQL Express 2005的链接,但我找不到类似的SQL Express 2008 R2,我不认为这个事实已经改变)。 它也不包括FILESTREAM数据,这很好。 这里有一些有用的评论。 此 SQL Server博客条目宣布规模增加。 SQL Server 2008 Express supports 4GB. SQL Server 200 ... -
您定义了一个CHECK约束: CREATE TABLE dbo.YourTable ( SomeIntColumn INT CONSTRAINT CHK_YourTable_SomeIntColumn CHECK (SomeIntColumn >= 0 AND SomeIntColumn <= 9999), ....... ) 您可以通过这种方式为数字列定义一系列可能的值。 在我的示例中使用此CHECK约束,您可以将INT列限制为最多4位数。 更新 对于INT样式 ...